Filter löschen
Filter löschen

how to write this in simple m file function

1 Ansicht (letzte 30 Tage)
uncung fgv
uncung fgv am 19 Nov. 2012
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 Kommentare
Walter Roberson
Walter Roberson am 19 Nov. 2012
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 am 23 Nov. 2012
you are right i have changed it. thx.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Pedro Villena
Pedro Villena am 19 Nov. 2012
.m
function [S] = myMFile(a,x,K)
%w = W-Wmin;
w = (0:0.01:3);
S = (1-exp(-a.*x.*w).*K;

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by