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' );
回答 (2 件)
KSSV
2020 年 8 月 20 日
% 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
2020 年 8 月 20 日
0 投票
Remove (none)
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!