how to write this in simple m file function

4 ビュー (過去 30 日間)
uncung fgv
uncung fgv 2012 年 11 月 19 日
S=1-exp(-a.*x.*w).K);
where
a=2
x=3
K=3
i am get confuced at this part:
w=W-Wmin
w=(0:0.01:3);
  2 件のコメント
Walter Roberson
Walter Roberson 2012 年 11 月 19 日
Those last two items seem to contradict each other, as you are using the same variable name for both of them.
Your syntax on your first line is wrong: you end in .K) which has no operator with the period and ends in a bracket that does not match anything.
uncung fgv
uncung fgv 2012 年 11 月 23 日
you are right i have changed it. thx.

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

採用された回答

Pedro Villena
Pedro Villena 2012 年 11 月 19 日
.m
function [S] = myMFile(a,x,K)
%w = W-Wmin;
w = (0:0.01:3);
S = (1-exp(-a.*x.*w).*K;
  1 件のコメント
uncung fgv
uncung fgv 2012 年 11 月 23 日
thx so much.

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by