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

Deciding to stick with EE.

Mohamed Asif

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

Carl Webster
CTP, Sr Infrastructure Consultant

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

Troubleshooting
Research
Professional Opinions
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.

Programming Languages-Other
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;
``````