I'm trying to execute this code and constantly getting the message that 'variable jVals is indexed but not sliced'. Can anyone kindly help
iVal=5:0.2:5.4;jVal=2:0.5:2.5;iLen=length(iVal)jLen=length(jVal);matrix=zeros(iLen,jLen); parfor i=1:iLen dummy=zeros(1,jLen); for j=1:jLen dummy(j)=jVal(j); %/// This line is in ERROR
end matrix(i,:)=dummy; end
Best Answer