[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error: subscript indices must be either positive integers

From: Vesnog
Subject: Error: subscript indices must be either positive integers
Date: Sun, 25 Nov 2012 06:11:03 -0800 (PST)

Greetings everyone,

I am a new user of Octave and I was writing a code for a baseball thrown by
a pitcher including air drag and Magnus' force. I run into problems in the
34th line of my code and Octave says that, "subscript indices must be either
positive integers or logicals." The weird thing is I do not use subscripts
in the line mentioned ( or I am not aware and using some due to my lack of
experience), and the problematic expression seems to be the following
"S0m*omega(vz*sin(phi0) - vy*cos(phi0))*dt" when I discard this line
everything seems to work fine but I sacrifice physics if I do so. I want to
know the exact cause of the error so that I can correct my mistake and run
the simulation. I would be very grateful if someone could pinpoint the
mistake I make. 

Thanks in advance
Note: I have attached my script "baseball.m"
baseball.m <>  

View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]