plot function give data error

1 次查看(过去 30 天)
msh jgtu
msh jgtu 2020-1-1
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]
>>

回答(1 个)

Star Strider
Star Strider 2020-1-1
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

类别

Help CenterFile Exchange 中查找有关 Data Exploration 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by