Error using plot Invalid data argument.
Afficher commentaires plus anciens
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' );
Réponses (2)
KSSV
le 20 Août 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' );
madhan ravi
le 20 Août 2020
0 votes
Remove (none)
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects 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!