MATLAB Answers

How to enter the following functions

3 views (last 30 days)
Santiago Rodrigues
Santiago Rodrigues on 6 Oct 2019
Commented: Stephan on 6 Oct 2019
Hello,
So I need to enter the functions
6cos(theta)=theta/5 in the interval [pi,2pi] and
e^(-0.01x)=7x-2 in the interval [0,3]
The objective is to use the fzero opperator and stuff.
How can I do this?

  0 Comments

Sign in to comment.

Accepted Answer

Stephan
Stephan on 6 Oct 2019
Edited: Stephan on 6 Oct 2019
you need to rewrite so that the given equations are equal to zero. Then fzero finds x.
fun = @(x) something with x equal to zero
x0 = some starting point
res = fzero(fun,x0)

  3 Comments

Walter Roberson
Walter Roberson on 6 Oct 2019
In particular, the form
first_expression_in_variable = second_expression_in_variable
can be rewritten as
@(variable) first_expression_in_variable - second_expression_in_variable
Santiago Rodrigues
Santiago Rodrigues on 6 Oct 2019
Yeah, thanks. I realize I am very dumb. Thank you foe your help
Stephan
Stephan on 6 Oct 2019
Did you notice that you can accept and/or vote for useful answers?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by