use the fzero command on matlab to find a solution to sin2xc

use the fzero command on matlab to find a solution to sin^2(x)=cos^3(x). Show the matlab code you used.

Solution

func.m %declaration of the function sin2(x)-cos3(x)

function f = func(x)
    f = sin(x).^2 - cos(x).^3;
end

script.m %uses fzero to find out the zeros of the given function.

fun = @func;
x0 = 3;
x = fzero(fun, x0);
disp(x);

use the fzero command on matlab to find a solution to sin^2(x)=cos^3(x). Show the matlab code you used.Solutionfunc.m %declaration of the function sin2(x)-cos3(

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site