How to plot multiple Loops and draw data lables for legend
Ältere Kommentare anzeigen
Hi
I want to plot return value C and add legend according to iteration for below code
A = [1:4];
B = [1:4];
C = zeros(size(A,2),size(B,2));
for i = 1:length(A)
for j = 1:length(B)
C(i,j) = power(A(i),B(j));
end
end
3 Kommentare
KSSV
am 24 Sep. 2021
Loop not required:
C = (A').^B ;
How would like to add legend? Do you have any demo picture?
Life is Wonderful
am 24 Sep. 2021
Bearbeitet: Life is Wonderful
am 24 Sep. 2021
Life is Wonderful
am 24 Sep. 2021
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Legend finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


