With Matlab, how to create a legend with a loop?
One can create a MATLAB legend with a loop thanks to the following script:
N = 5;
Legend=cell(N,1);
for i=1:N
Legend{i} = sprintf('Text %d', i);
end
legend(Legend);
The above code should display something like:
One can create a MATLAB legend with a loop thanks to the following script:
N = 5;
Legend=cell(N,1);
for i=1:N
Legend{i} = sprintf('Text %d', i);
end
legend(Legend);
The above code should display something like:
One can create a MATLAB legend with a loop thanks to the following script:
N = 5;
Legend=cell(N,1);
for i=1:N
Legend{i} = sprintf('Text %d', i);
end
legend(Legend);
The above code should display something like:
One can create a MATLAB legend with a loop with the following code:
N = 5;
Legend=cell(N,1);
for i=1:N
Legend{i} = sprintf('Text %d', i);
end
legend(Legend);
The above code should display something like:
# | ID | Query | URL | Count |
---|---|---|---|---|
0 | 13243 | en | https://en.ans.wiki/6825/with-matlab-how-to-create-a-legend-with-a-loop | 5 |