[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error: subscript indices must be either positive integers or logicals -
From: |
jammydav93 |
Subject: |
Error: subscript indices must be either positive integers or logicals - For simple surf plot |
Date: |
Thu, 24 Nov 2011 13:33:27 -0800 (PST) |
Hi,
I'm trying to make a function which plots the values of C from A and B
My function is simply:
function f(g)
for a=0:pi
for b=0:pi
c(a,b)=tan(g*a) * arcsin(g*b);
end
end
surf(c);
The function works when I start the loops from 1, however I need the loops
to start at 0, when I start the loops at 0 I get the error "subscript
indices must be either positive integers or logicals."
Anybody know how I can solve this?
Thanks
L
--
View this message in context:
http://octave.1599824.n4.nabble.com/Error-subscript-indices-must-be-either-positive-integers-or-logicals-For-simple-surf-plot-tp4105648p4105648.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Error: subscript indices must be either positive integers or logicals - For simple surf plot,
jammydav93 <=