Plotting frequency curves in one figure
Afficher commentaires plus anciens
I have 3 different frequency intervalls ( see frequency ranges columns) and I would like to plot them in one figure.
I tried to plot them with this code below but I either get the error that they should have the same vector length or I get the following error:
"Element 2 of the text contains 1 matches while the previous elements have 0. All elements must contain the same number of matches."
Thanks a lot in Advance for the help!
FEC_fb2=FEC_f2.fr;
FEC_fb2 = double(split(string(FEC_fb2(1:end-1)) , ","));
FEC_fb2 = FEC_fb2(:,2);
FEC_fb3=FEC_f3.fr;
FEC_fb3 = double(split(string(FEC_fb3(1:end-1)) , ","));
FEC_fb3 = FEC_fb1(:,3);
FEC_fb1=FEC_f1.fr;
FEC_fb1 = double(split(string(FEC_fb1(1:end-1)) , ","));
FEC_fb1 = FEC_fb1(:,1);
FEC_timefb1 = duration(string(FEC_f1.time));
FEC_timefb2 = duration(string(FEC_f2.time));
FEC_timefb3 = duration(string(FEC_f3.time));
nexttile
plot(FEC_timefb1(1:end-1),FEC_fb1);
xticks([FEC_timefb1(1) FEC_timefb1(end-1)]);
hold on
plot(FEC_timefb2(1:end-1),FEC_fb2);
plot(FEC_timefb3(1:end-1),FEC_fb3);
plot([FEC_timefb1(1) FEC_timefb1(end-1)],[avg_FEC avg_FEC],'b-','LineWidth',2);
title(' var ')
xlabel('Uhrzeit in [HH:MM:SS]')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!