フィルターのクリア

i got an error when i run this code ?

2 ビュー (過去 30 日間)
mohamed
mohamed 2013 年 3 月 14 日
x=(1:100); for k=1:5 y(:,k)=k*log(x); end plot(x,y)
the error is in the third line? i want to make a single plot for different values of k

採用された回答

Andrei Bobrov
Andrei Bobrov 2013 年 3 月 14 日
編集済み: Andrei Bobrov 2013 年 3 月 14 日
k = 1:5;
x = 1:100;
y = k'*log(x);
plot(x,y);
  2 件のコメント
mohamed
mohamed 2013 年 3 月 14 日
you really got what i want but did you find the error in my code ??
Andrei Bobrov
Andrei Bobrov 2013 年 3 月 14 日
see Wayne's answer

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

その他の回答 (1 件)

Wayne King
Wayne King 2013 年 3 月 14 日
編集済み: Wayne King 2013 年 3 月 14 日
x=(1:100); for k=1:5 y(:,k)=k*log(x); end, plot(x,y)
You forgot a semicolon, or comma after end
or better yet:
x=(1:100);
for k=1:5
y(:,k)=k*log(x);
end
plot(x,y)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by