Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Including legends for plots under the FOR LOOP

1 Ansicht (letzte 30 Tage)
Natnael Hamda
Natnael Hamda am 4 Mai 2012
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I would like to plot a figure with a for loop and want to include the legends for each single plot; any one with the help, here is the code
A = 100;
nr = length(t);
nc = length (K);
X = zeros ( nr , nc);
for i = 1 : nr for j = 1:nc
X (i,j) = A .* (1 - exp(- K (j) .* t (i)));
end
end
for i = 1 : nc
plot(X (:,i))
hold on
end
Is it possible include the legend inside the for loop ?

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by