how can i insert in plot different values
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
andrew moisidi
il 25 Mag 2021
Commentato: andrew moisidi
il 26 Mag 2021
how can i make a code that repeats the plot command and for each different iteration has different results
My Board X (20x5)
fu*nction [Y] = PlotProduct(X,Names)
for N = 1: 5;
figure;
plot(X);
title(Names{N});
xlabel('PRICES');
end
0 Commenti
Risposta accettata
Sulaymon Eshkabilov
il 25 Mag 2021
Hi,
Here is a simple solution:
Names={'One', 'Two', 'Three', 'Four', 'Five'};
X = randi([0, 13], 5, 15);
for N = 1: 5
figure(N)
PlotProduct(X(N, :), Names{N})
end
function [Y] = PlotProduct(X,Names)
plot(X);
title(Names);
xlabel('PRICES');
end
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!