How to write a really long equation?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
selio
am 22 Okt. 2016
Kommentiert: Thi Na Le
am 25 Mär. 2020
Hello everyone. I am a kind of new learner of MATLAB. I need to write the attached equation but I always get errors. Are there anyone who can write the correct version of it?
Btw x an y will be arrays.
Thank you everybody.

0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 22 Okt. 2016
Bearbeitet: Walter Roberson
am 22 Okt. 2016
term1 = (log(x.^(-2) .* y.^3) .* 10^3 .* y.^abs(x)) ./ ...
(factorial(4) .* 2.8 ./ 3.16 );
term2 = (2.^(1/3) .* 5 + 6 .* 2.^(-2) ./ 3.^2 .* 4 .* ln(8./sqrt(x.*y)) ) ./ ...
(exp(0.2 .* x) .* sin(y.^(-2)).^2 .* abs(cos(x-u)).^(1/3) .* 0.25);
z = term1 + term2;
I have written this in vectorized form, so x and y can be vectors (or arrays) and you would get out a vector (or array) result.
1 Kommentar
Thi Na Le
am 25 Mär. 2020
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!