plot function give data error

1 visualizzazione (ultimi 30 giorni)
msh jgtu
msh jgtu il 1 Gen 2020
Risposto: Star Strider il 1 Gen 2020
I want to plot data that i have extracted from a figure using plot function but it gives error message "Not enough input arguments"
the data are x1 and y1
plot(x1,y1)
x1 =
[1x10 double]
[1x10 double]
[1x10 double]
[1x10 double]
y1 =
[1x10 double]
[1x10 double]
[1x10 double]
[1x10 double]
>>

Risposte (1)

Star Strider
Star Strider il 1 Gen 2020
They would appear to be cell arrays.
This will work:
figure
plot([x1{:}], [y1{:}])
however you will probably prefer this result:
figure
hold on
for k = 1:size(x1,1)
plot(x1{k}, y1{k})
end
hold off
grid

Categorie

Scopri di più su Data Exploration in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by