Negative initial value problem. Index must be a positive integer or logical.
Afficher commentaires plus anciens
When I tried to run this code :
yprime= @(t,y) (.01)*(6*(t^5)-10*(t^4)-104*(t^3)+84*(t^2)+290*t-26)
y(-4)= 0.4
t_range = [-4,5]
I get this error message: "Attempted to access y(-4); index must be a positive integer or logical."
Any ideas for how to fix this. I am just learning MatLab and I don't think we are expected to do anything too advanced.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Video Formats and Interfaces dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!