How do I solve 'Invalid first data argument'?

7 ビュー (過去 30 日間)
Samuel Lotay
Samuel Lotay 2016 年 4 月 17 日
編集済み: Walter Roberson 2016 年 4 月 18 日
Hello, I am currently a university student currently doing a MATLAB coursework assignment. I have produced the following coding as part of the assignment:
Co = 0.0000113125;
V = 400000000;
R = 14000000;
Mo = 4525;
t = 0:1:60;
Ct = Co + exp((-R/V)*t);
Ct
Cppb = (1000000000*(Ct/1000));
Cppb
figure
plot(Cppb,t,'-r','o','MarkerFaceColor','g','MarkerSize',4)
xlabel('Time (days)');
ylabel('Concertration (ppb)');
title('Lake Chemical Spill Analysis');
legend('Concertration of Chemical in Lake')
And for some reason, it keeps saying 'Invalid first data argument' and I am not sure why. Can someone help? Any help would be appreciated.
Thanks.

回答 (1 件)

Yu
Yu 2016 年 4 月 17 日
The issues is cause by plot command with both '-r' and 'o'. Do you want a red line with green markers? If that this the case, you may want to change the plot line to
plot(Cppb,t,'-o', 'Color', 'r', 'MarkerFaceColor','g','MarkerSize',4)
  1 件のコメント
Samuel Lotay
Samuel Lotay 2016 年 4 月 18 日
Thanks for the suggestion. I've managed to solve this thanks to a suggestion from one of my friends on my university course. But thanks for the suggestion anyway.

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

カテゴリ

Help Center および File ExchangeChemistry についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by