Basics on MATLAB related Questions and Answers


Question :   A student has to find the solution of an equation cos(x)=1/2. She has to write the program such that exact values are shown at output. Which of the following codes would help her?
1. syms x;eqn = cos(x) == 1/2;vpa( solve(eqn,x))
2. syms x;eqn = cos(x) == 1/2;solve(eqn,x)
3. vpa(solve('cos(x)=1/2'))
4. syms x;eqn = cos(x) = 1/2;vpa(solve(eqn,x))
Answer :   3 - vpa(solve('cos(x)=1/2'))  

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter