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:
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.
This subject is archived
New comments can not be posted and votes can not be cast
Sort by: best
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).
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 :)
More write-ups from the matlab community
Continue browsing in r/matlab
Official MATLAB subcouchsurfingcook.com
Created Aug 15, 2009
Top write-ups april 16th 2020Top posts of april, 2020Top write-ups 2020
helpcouchsurfingcook.com coinscouchsurfingcook.com premiumcouchsurfingcook.com gifts
See more: Roy'S 2840 Dallas Parkway, Plano, Tx 75093, Roy'S Restaurant
Back come Top