Effacer les filtres
Effacer les filtres

how to plot all the loops one one graph

2 vues (au cours des 30 derniers jours)
liu James
liu James le 15 Déc 2016
Commenté : liu James le 15 Déc 2016
I have this loop written, but its providing an error at the same time and not providing all the graphs.
for i=1:length(time)
plot(time{i}(21:end,1),open{i}(21:end,1)...
time{i}(21:end,1),upper_channel{i},...
time{i}(21:end,1),lower_channel{i},...
time{i}(21:end,1),middle_value{i});
end
Error: File: setParam.m Line: 109 Column: 6
Unexpected MATLAB expression.
I've attached the file as well.

Réponse acceptée

KSSV
KSSV le 15 Déc 2016
You forgot to put a comma..
load plot.mat ;
for i=1:length(time)
plot(time{i}(21:end,1),open{i}(21:end,1),...
time{i}(21:end,1),upper_channel{i},...
time{i}(21:end,1),lower_channel{i},...
time{i}(21:end,1),middle_value{i});
end
  3 commentaires
José-Luis
José-Luis le 15 Déc 2016
hold on
before your first plot()
liu James
liu James le 15 Déc 2016
perfect thanks Jose

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by