Filter löschen
Filter löschen

how do you solve

1 Ansicht (letzte 30 Tage)
Ls
Ls am 18 Aug. 2021
Beantwortet: Walter Roberson am 18 Aug. 2021
when x=1, y=x.^2+3 /(x+1)
and
when x=2:100, y=x.^2-3 /(x+1)
how do you solve this in matlab using vectorization method

Antworten (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov am 18 Aug. 2021
% Scalars can be computed directly as they appear in the expression, e.g.:
x=1; y=x^2+3/(x+1);
% For vectors or matrices, USE an elementwise operation (.), e.g.:
x=2:100; y=x.^2-3./(x+1);

Walter Roberson
Walter Roberson am 18 Aug. 2021
You would use the same techniques that Image Analyst showed in replying to you at https://www.mathworks.com/matlabcentral/answers/1413242-how-to-solve-equation#answer_769277 -- just modify the function expression.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by