Warning: Matrix is singular to working precision.
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Matthew Mercado
am 5 Mär. 2015
Kommentiert: Redouane Boudjemaa
am 27 Okt. 2019
This is my code and I keep getting the error "Warning: Matrix is singular to working precision." I am getting extremely frustrated because i looked up the problem and my code seems to be correct but i am new to this so i could be missing something. Any help would be appreciated! Thank you! :)
x=(-pi:pi/10:pi);
y=(-pi:pi/10:pi);
[X,Y]=meshgrid(x,y)
Z=(sin(sqrt(X.^2+Y.^2)))/(sqrt(X.^2+Y.^2));
mesh(X,Y,Z)
xlabel('x-axis')
ylabel('y-axis')
zlabel('z-axis')
0 Kommentare
Akzeptierte Antwort
James Tursa
am 5 Mär. 2015
Bearbeitet: James Tursa
am 5 Mär. 2015
Z=(sin(sqrt(X.^2+Y.^2)))./(sqrt(X.^2+Y.^2)); % changed / to ./
The ./ is element-wise division, whereas the / implies the equivalent of linear algebra matrix inversion.
doc divide
doc mrdivide
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!