how to run this function into one way run?

5 ビュー (過去 30 日間)
uncung fgv
uncung fgv 2012 年 11 月 23 日
how to run this function into one way run?
i have to change always k at 1, 2,3,4,5,6...
how to run it in one times debug?
.
k=1,2,3,4,5,6,7..etc; i have to change it as 1, 2, 3,4,5,6,7...
.
w=8; constant
x=2; constant
a=0.2 ; constant
w=(0:0.3:3);
.
S=[1-exp(-a.*x.*k.*w)];
figure(1)
plot(w,S,'-+');
xlabel('w');
ylabel('S');
hold off

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 11 月 23 日
編集済み: Azzi Abdelmalek 2012 年 11 月 23 日
k=[1,2,3,4,5,6,7]
w=8;
x=2;
a=0.2 ;
w=(0:0.3:3)
S=cell2mat(arrayfun(@(k) 1-exp(-a*x*k.*w),k','un',0))
close
plot(w,S,'-+');
xlabel('w');
ylabel('S');
  7 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 11 月 23 日
uncung, If you have another question, just post a new one. And my first question was about your previous comment.
uncung fgv
uncung fgv 2012 年 11 月 23 日
ok i send new question about this. thx

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by