How to resolve floating point zero error in the following code

2 vues (au cours des 30 derniers jours)
Manish
Manish le 5 Déc 2018
Commenté : Manish le 5 Déc 2018
for i=1:3
for j=1:3
for k=1:z
p=Q(i,j,k)*(Z(k+1)-Z(k));
q=Q(i,j,k)*(Z2(k+1)-Z2(k));
r=Q(i,j,k)*((Z(k+1))^3-(Z(k))^3);
A(i,j)= A(i,j)+p;
B(i,j)= B(i,j)+q;
D(i,j)= D(i,j)+r;
end
end
end
  6 commentaires
Manish
Manish le 5 Déc 2018
There is no way to to resolve it ?
Because i have to display the ABD matrix and
if i use A(A~= 0) = 0;
whole A matrix is resulting in zero matrix although every element is not approximately zero.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by