Solve f(x) with mex files
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello together,
i have the following problem.
An Matlab add-in gives me (via mex files) the possibility to generate Steam-Properties
e.g. function xs_ph_97(p,h) gave me the xs value of the steam.
So i have the following problem:
The i need to solve the function F(x) = (xs_ph_97(x,h) == 0,5).
When i create a script with
syms f(x)
f(x) = (xs_ph_97(x,h) == 0,5)
I get following error:
!x_ph_97: unreasonable type or size of argument 1!
Can somebody help me
Best regards
0 Kommentare
Antworten (1)
Walter Roberson
am 23 Nov. 2015
h = some appropriate value
x0 = initial value of x to check
Fx = fzero(@(x) xs_ph_97(x,h) - 0.5, x0);
This is not a function because there is a single x solution (or one solution for each h value): Fx will be the x that solves xs_ph_97(x,x) == 0.5
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!