Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Error using ==> mpower . Matrix must be square.

Avatar of YANKAUSKAS
YANKAUSKASFlag for United States of America asked on
Programming Languages-Other
2 Comments1 Solution19979 ViewsLast Modified:
Why do we need the period before the ^ operator but not in other? IF the function is x^2- x*sin(x), do we need the period before the * in x*sin(x);

I'm in need of the answer, asap!
 Thank you very much!
f=inline('x.^2-4*sin(x)');
df=inline('2*x-4*cos(x)');
esp=input('esp =');
x=0.5:0.01:3.5;y=f(x);
plot(x,y); hold on;
x=[];y=[];
x=[x 3]; y=[y f(x(1))];
i=2;
while abs(x(i)-x(i-1))>2*esp
    i=i+1;
    x=[x x(i-1)-f(x(i-1))/df(x(i-1))];
    y=[y f(x(i))];
    plot(x(i),y(i),'rp')
    fprintf('\n\t%f\t%f',x(i),f(x(i)));
end
plot(x(end),f(x(end)),'*'); hold off;
ASKER CERTIFIED SOLUTION
Avatar of LukeyJay
LukeyJay

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers