Effacer les filtres
Effacer les filtres

Need help understanding error PLEASE

3 vues (au cours des 30 derniers jours)
Triggs
Triggs le 27 Avr 2020
Modifié(e) : Triggs le 1 Mai 2020

Réponses (1)

Ameer Hamza
Ameer Hamza le 27 Avr 2020
Modifié(e) : Ameer Hamza le 27 Avr 2020
You haven't attached the function fwithforcing(), so I cannot run your code, but I guess that sometimes the value of x(n) becomes negative, which causes an issue with axis() function. The limits in axis() should be in ascending order. Try to change it like this.
axis([sort([0 x(n)]) -Fmax Fmax]);
Note that you will need to change both calls to axis().
  5 commentaires
Triggs
Triggs le 27 Avr 2020
Modifié(e) : Triggs le 27 Avr 2020
I've found the problem on line 116 there is a ^4, when that is removed the entire code works but when its there thats when the errors occur but that term needs to be there. is there any way i can fix that?
b(i)=b(i)+q(i+1)*dt/dx*U(i+1)^4;
Ameer Hamza
Ameer Hamza le 27 Avr 2020
I do not clearly understand about your program logic. You need to analyze this according to the equations you have.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Heat and Mass Transfer dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by