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

Torsten
Torsten 2018년 4월 25일
Which MATLAB version do you use ?
Jacob Markussen
Jacob Markussen 2018년 4월 25일
편집: Matt J 2018년 4월 25일
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)

답변 (1개)

Torsten
Torsten 2018년 4월 25일
편집: Torsten 2018년 4월 25일

0 개 추천

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)

이 질문은 마감되었습니다.

태그

질문:

2018년 4월 25일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by