Matlab: need to enter "w(x)=(wmax*e^(-x/α)) (cos(x/α) + sin (x/α)"
Hi guys, first of all I am new so thanks for your help in advance! I hope this is the right place for my problem, also if it is not a forum for matlab but maybe some of you used it already.
I have to put this into matlab:
w(x)=(wmax*e^(-x/α)) (cos(x/α) + sin (x/α)
I can put values for x and alpha
The wmax at x=0 is equal to V/(2Δϱgα)
I am starting using matlab in these months so I am sorry if I did some rough errors but I need to improve very soon
I first tried to write this:
function w = pippo (x, alpha)
w = (((max(w))*(exp(-x/alpha)))*(cos(x/alpha)+sin(x/alpha)))
end
but of course it says that the max(w) might be used before it is defined.
I also did another couple of attempts using the V/(2Δϱgα) but nothing actually improved the situation.
Thank you in advance.
Hi guys, first of all I am new so thanks for your help in advance! I hope this is the right place for my problem, also if it is not a forum for matlab but maybe some of you used it already.
I have to put this into matlab:
w(x)=(wmax*e^(-x/α)) (cos(x/α) + sin (x/α)
I can put values for x and alpha
The wmax at x=0 is equal to V/(2Δϱgα)
I am starting using matlab in these months so I am sorry if I did some rough errors but I need to improve very soon
I first tried to write this:
function w = pippo (x, alpha)
w = (((max(w))*(exp(-x/alpha)))*(cos(x/alpha)+sin(x/alpha)))
end
but of course it says that the max(w) might be used before it is defined.
I also did another couple of attempts using the V/(2Δϱgα) but nothing actually improved the situation.
Thank you in advance.