Error is basic I think? "Matrix is singular to working precision" and my z(matrix) is complete of NaN through the last collumn being complete of "-Inf".

I to be unsure just how to exactly this together I have actually introduced the formula for z mathematically correct with suitable parenthesis.

Code is as follows:

clf;

clear all;

xrange = -10:1:10;

yrange = -10:1:10;

xmat = repmat(xrange, length(yrange), 1);

ymat = repmat(yrange', 1, length(xrange));

z = (sin(sqrt(xmat.^2+ymat.^2)))/(0.1+sqrt(xmat.^2+ymat.^2));

mesh(xmat, ymat, z);

ANY help APPRECIATED thanks :)




You are watching: Warning: matrix is singular to working precision.

2 comments
share
save
hide
report
100% Upvoted
This subject is archived
New comments can not be posted and votes can not be cast
Sort by: best


*

level 1
· 1y
uses_spinmap
Your problematic heat looks prefer it's utilizing matrix division, however I'm guessing friend want facet division. In various other words, shot this:

z = (sin(sqrt(xmat.^2+ymat.^2)))./(0.1+sqrt(xmat.^2+ymat.^2));

FYI, i think your line would be throw a warning (yellow text) no an error (red text).


1
Share
ReportSave
level 2
Op · 1y

Omg ns noticed that for the multiplication component but not for the division. That need to solve it say thanks to you greatly. Also for explaining the error vs warning. Brand-new matlab user :)


1
Share
ReportSave
More write-ups from the matlab community
Continue browsing in r/matlab


*

r/matlab
Official MATLAB subcouchsurfingcook.com
42.3k
coders


44

logged in


Created Aug 15, 2009
Join
*
*
*
*

*

Top write-ups april 16th 2020Top posts of april, 2020Top write-ups 2020
helpcouchsurfingcook.com coinscouchsurfingcook.com premiumcouchsurfingcook.com gifts
aboutcareerspressadvertiseblogTermsContent policyPrivacy policyMod policy


See more: Roy'S 2840 Dallas Parkway, Plano, Tx 75093, Roy'S Restaurant

Back come Top