MATLAB: How to convert this code into gpuArray
Uncategorized
MATLAB: How to convert this code into gpuArray control systemMATLAB tic;z=1:0.5:10;a=1:0.5:5;num=kron(z,ones(1,length(a)));i=1:length(a);deno=zeros(9,3);deno(i,1)=1;deno(i,2)=a(i);den=repmat(deno,length(z),1);n=numel(num);for m=1:nsys(m)=tf(num(m),den(m,:));endbode(sys(m)) Best Answer A blanket change would be z=gpuArray.colon(1,0.5,10);a=gpuArray.colon(1,0.5,5);num=kron(z,ones(1,length(a),'gpuArray'));i=gpuArray.colon(1,length(a));deno=zeros(9,3,'gpuArray');deno(i,1)=1;deno(i,2)=a(i);den=repmat(deno,length(z),1);n=numel(num);for …