FSOLVE requires all values returned by functions to be of data type double. showing while solving an algebraic equation in matlab ??
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Surendra Ratnu
am 8 Dez. 2023
Kommentiert: Dyuman Joshi
am 5 Feb. 2024
I want to solve the eqs for u_s and find out the value of u_s but i am getting error while solving the equation using fsolve. Can you provide some solution for this problem ?? Thank you
type untitled03.m
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 8 Dez. 2023
F and G are int() calls. Even if they evaluate to closed forms that were rational numbers, they have symbolic results. When you create an anonymous function that includes F and G, any numeric coefficients will be converted to symbolic at the point F or G is encountered, so the anonymous function will return something of data type sym even in the best possible case. But fsolve requires single or double. fsolve refuses to even try to convert sym to double.
Instead of constructing that anonymous function you should use matlabFunction()
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Number Theory 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!