Clear Filters
Clear Filters

plot function give data error

1 view (last 30 days)
msh jgtu
msh jgtu on 1 Jan 2020
Answered: Star Strider on 1 Jan 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]
>>

Answers (1)

Star Strider
Star Strider on 1 Jan 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

Categories

Find more on Data Exploration in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!