# Error in using NDSolve

Posted 4 months ago
668 Views
|
4 Replies
|
0 Total Likes
|
 n = 2 sol=NDSolve[{Table[{x_i'[t]==ν_i [t],y_i'[t]==ω_i [t],z_i'[t]==ρ_i [t]},{i,1,n}], Table[{x_i [0]==x0[i],y_i [0]==y0[i],z_i [0]==z0[i]},{i,1,n}]}, Flatten[Table[{x_i,y_i,z_i},{i,1,n}]],{t,0,T}, MaxSteps→Infinity,Method→{"DiscontinuityProcessing"→False}] This is the errorNDSolve::ndinnt: Initial condition x0[1.] is not a number or a rectangular array of numbers.Please someone can help me on how to solve this error
4 Replies
Sort By:
Posted 4 months ago
 Take a look at the result of evaluating Table[{x_i'[t]==ν_i [t],y_i'[t]==ω_i [t],z_i'[t]==ρ_i [t]},{i,1,n}] In the WL underscore represents Blank. Perhaps you meant this? Table[{x[i]'[t] == ν[i][t], y[i]'[t] == ω[i][t], z[i]'[t] == ρ[i][t]}, {i, 1, n}] 
Posted 4 months ago
 It is x subscript i.. This problem deals with {x1, y1, z1} {x2 ,y2, z2}. The numbers are subscript.
Posted 4 months ago
 Evaluating the code you posted results in NDSolve::dsfun: x:Blank[1] cannot be used as a function. Which is different from the error you posted. So, the code you are running is not the code that you posted (which has no Subscript). It is best to avoid the use of Subscript in WL, better to use indexed variables as I suggested. Did you try that?
Posted 4 months ago
 Thank you so much... :) it works
Community posts can be styled and formatted using the Markdown syntax.