In a recent blog about the MATLAB solve command, I mentioned that the solve command was not giving us the unique real solution to a physical problem. A user at MATLAB suggested declaring the syms variable as real, before using the solve command. That worked. So if the equation in terms of the variable b is eqnb=0, then use
syms b real;
This post is brought to you by Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at http://numericalmethods.eng.usf.edu, the textbook on Numerical Methods with Applications available from the lulu storefront, the textbook on Introduction to Programming Concepts Using MATLAB, and the YouTube video lectures available athttp://numericalmethods.eng.usf.edu/videos. Subscribe to the blog via a reader or email to stay updated with this blog. Let the information follow you.
Author: Autar Kaw
Autar Kaw (http://autarkaw.com) is a Professor of Mechanical Engineering at the University of South Florida. He has been at USF since 1987, the same year in which he received his Ph. D. in Engineering Mechanics from Clemson University. He is a recipient of the 2012 U.S. Professor of the Year Award. With major funding from NSF, he is the principal and managing contributor in developing the multiple award-winning online open courseware for an undergraduate course in Numerical Methods. The OpenCourseWare (nm.MathForCollege.com) annually receives 1,000,000+ page views, 1,000,000+ views of the YouTube audiovisual lectures, and 150,000+ page views at the NumericalMethodsGuy blog. His current research interests include engineering education research methods, adaptive learning, open courseware, massive open online courses, flipped classrooms, and learning strategies. He has written four textbooks and 80 refereed technical papers, and his opinion editorials have appeared in the St. Petersburg Times and Tampa Tribune.
View all posts by Autar Kaw
One thought on “Does the solve command in MATLAB not give you an answer?”
Reblogged this on Mustafa Alper YILDIZ's Blog.