MATLAB Answers

0

how to write this in simple m file function

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 Comments

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.
you are right i have changed it. thx.

Sign in to comment.

Tags

Products

1 Answer

Answer by Pedro Villena on 19 Nov 2012
 Accepted Answer

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

  1 Comment

Sign in to comment.