Unable to perform assignment because the indices on the left side are not compatible with the size of the right side. while using url read command

1 Ansicht (letzte 30 Tage)

I am trying to link the NL5 software with HTTP link, using the following code . However I am getting the following error in matlab
Unable to perform assignment because the indices on the left side are not compatible
with the size of the right side.

Error in link_example (line 17)
Graph(k,:)=str2num(urlread(Cmd4));

clear
clc
close all
R=logspace(-1,1);
Header='http://127.0.0.1/?';
Cmd2=[Header,'tran'];
Cmd3=[Header,'ready'];
Cmd4=[Header,'V(out)%200,50,.1'];
for k=1:length(R)
Cmd1=[Header,'R1=',num2str(R(k))];
urlread(Cmd1);
urlread(Cmd2);
Response='0';
while strcmp(Response,'0')
Response=urlread(Cmd3);
end
Graph(k,:)=str2num(urlread(Cmd4));
end
Graph=Graph';
surf(Graph)
shading flat
colormap jet
colorbar
ylim([0 400])

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by