why can't I get a simpel solve function to work

this is my code:
syms x
eqn = sin(x) == 1;
solx = solve(eqn,x)
I have copied it of Matlabs own site.
This is what it is supposed to give: pi/2
this is what i get: x
what am i doing wrong?

2 Kommentare

Torsten
Torsten am 25 Apr. 2018
Which MATLAB version do you use ?
Jacob Markussen
Jacob Markussen am 25 Apr. 2018
Bearbeitet: Matt J am 25 Apr. 2018
I want to use it for:
syms t
o = @(z) exp((-z.^2)/2);
p = 1/sqrt(2*pi)*integral(o,-1,1)
p = 0.6827
h = 1/sqrt(2*pi)*integral(o,-t,t);
solve(h == 0.6827,t)

Antworten (1)

Torsten
Torsten am 25 Apr. 2018
Bearbeitet: Torsten am 25 Apr. 2018

0 Stimmen

syms t z
p = 0.6827;
o = exp(-z^2/2);
h = 1/sqrt(2*pi)*int(o,z,[-t t]);
sol = solve(h == p,t)

Diese Frage ist geschlossen.

Tags

Gefragt:

am 25 Apr. 2018

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by