Error using plot
Error in color/linetype argument.
Error in garcia (line 65)
figure(2);hold off;plot(x_plot,m_plot,'1');hold on;

 採用された回答

Star Strider
Star Strider 2015 年 12 月 24 日
編集済み: Star Strider 2015 年 12 月 24 日

0 投票

The problem is that you are using the Octave code rather than the MATLAB code for figure(2):
CURRENT CODE:
% Octave
figure(2);hold off;plot(x_plot,m_plot,'1');hold on;
plot(x_plot,n_plot,'2');plot(x_plot,h_plot,'3');
xlabel('Tiempo (ms)'); ylabel('Variables de membrana');
% Matlab
% figure(2);hold off;plot(x_plot,m_plot,'b');
% hold on;plot(x_plot,n_plot,'black');
% plot(x_plot,h_plot,'r');xlabel('Tiempo'); ylabel('Tau');
CHANGE IT TO:
% Octave
% figure(2);hold off;plot(x_plot,m_plot,'1');hold on;
% plot(x_plot,n_plot,'2');plot(x_plot,h_plot,'3');
% xlabel('Tiempo (ms)'); ylabel('Variables de membrana');
% Matlab
figure(2);hold off;plot(x_plot,m_plot,'b');
hold on;plot(x_plot,n_plot,'black');
plot(x_plot,h_plot,'r');xlabel('Tiempo'); ylabel('Tau');
xlabel('Tiempo (ms)'); ylabel('Variables de membrana');
and you should have no problems.

1 件のコメント

Star Strider
Star Strider 2015 年 12 月 25 日
Replying to your PM, as always, my pleasure!

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2015 年 12 月 24 日

0 投票

What is the '1', '2', and '3' for? It needs to be a color, a marker, and a line style, like 'bo-' or 'rd:'. If you want a legend, use legend(). If you want text up there at some specific place, use text().

カテゴリ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by