Error using plot Invalid data argument.

Why am I getting this message?? Error using plot, invalid data argument?
%% Tabulate Values
% Create x array
x = linspace(xmin, xmax, Nx);
% Create y array
y = cos((2*p*x)/(L));
%% Experimental Data
xexp = [1, 2, 3, 4, 5];
Trial1 = [0.38, -0.82, -0.79, 0.28, 0.93];
Trial2 = [0.36, -0.80, -0.88, 0.45, 1.10];
Trial3 = [0.22, -0.67, -0.94, 0.27, 0.98];
%% Plot Data
% Plot the x and y arrays.
plot(x, y, 'k-', 'LineWidth', 1, ...
xexp, Trial1, 'go(none)', ...
xexp, Trial2, 'rx(none', ...
xexp, Trial3, 'b*(none)' );
% Add axis labels
xlabel('x');
ylabel('y');
% Create title block
title( 'plotPractice' );

Respuestas (2)

KSSV
KSSV el 20 de Ag. de 2020
% Plot the x and y arrays.
plot(x, y, 'k-', 'LineWidth', 1, ...
xexp, Trial1, 'go', ...
xexp, Trial2, 'rx', ...
xexp, Trial3, 'b*' );
% Add axis labels
xlabel('x');
ylabel('y');
% Create title block
title( 'plotPractice' );

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 20 de Ag. de 2020

Respondida:

el 20 de Ag. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by