Why does vpasolve fail when I try to use sind() in my equation to be solved numerically?
2 views (last 30 days)
Show older comments
I want to get some numerical solutions for an equation that I have at various values of parameters. My expression to be solved includes sines and cosines. I came across the help page for vpasolve, here:
The second example even includes a function with cos() in it. However, I wanted to express my arguments in degrees rather than radians. So I used sind() and cosd() functions, but it failed. It gave me an error about undefined function "sind". If I revert to sin() and cos() functions and express my argument as radians, it works. Why is this? Does Matlab not know how to convert a "regular" number into degrees at the end? Or what? My objective was to extract a value for degrees (or radians) that would satisfy the equation.
0 Comments
Answers (2)
John D'Errico
on 14 Apr 2016
Is it really that difficult to write this
sin(D*pi/180)
instead of sind(D)? Yes, it would be nice if the symbolic TB recognized sind. Maybe that will happen in a future release. Until then, you will just be forced to type a few extra characters. Life is tough. :)
3 Comments
Walter Roberson
on 16 Apr 2016
Wow, do you still have that cranked computer? Those are valuable antiques now!
Walter Roberson
on 15 Apr 2016
You can always define sind locally
sind = @(D) sin(D*sym('pi')/sym(180))
0 Comments
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!