Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Help defining a few variables

1 回表示 (過去 30 日間)
Dustin
Dustin 2014 年 6 月 25 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
There is a set of data (San Luis) 5 columns 16 rows. Column 1 is day numbers column 2 is the number of bacteria 1 column three is number of bacteria 2.
How would you create a variable called daySanLuis to represent the day numbers (column 1 all rows) ?
How would you create a variable called bacteria1SanLuis? (Column 2 all rows)?
How would you create a figure that plots day(x axis) vs bacteria1 and bacteria2for San Luis?

回答 (1 件)

Dan Kenney
Dan Kenney 2014 年 6 月 25 日
this should work.
day_san_luis = san_luis(:,1);
bacteria_1_san_luis = san_luis(:,2);
bacteria_2_san_luis = san_luis(:,3);
days = [1:1:16]
plot(days,bacteria_1_san_luis)
hold on
plot(days,bacteria_2_san_luis)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by