Real valued function for positive x,y returning complex values?
Show older comments
I am getting this error when evaluating my function ff: "Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.467910e-279." The function isn't complex, so I am unsure why it is returning a matrix of 0+0i values. How do I fix this error?
x=[0:0.1:5];
y=[0:0.1:5];
[xx,yy]=meshgrid(x,y);
gg=10*xx*0.5+0.1*xx-10-2*yy;
figure
surf(xx,yy,gg)
xlabel('s1')
ylabel('s2')
zlabel('g(x,y)');
hold on;
q=zeros(51,51);
mesh(xx,yy,q);
ff=10*xx^0.5-3*yy^1.2 +2*yy;
Accepted Answer
More Answers (0)
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!