help-octave
[Top][All Lists]
Advanced

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

writing functions that accept arrays/(matrcies?)


From: Christopher Harvey
Subject: writing functions that accept arrays/(matrcies?)
Date: Sun, 8 Nov 2009 19:37:09 -0500
User-agent: KMail/1.12.1 (Linux/2.6.30-gentoo-r4; KDE/4.3.1; x86_64; ; )

Hello list,
I'm pretty new to octave and I have a few questions. 

I'll try to keep them in list form as much as possible.

Are ranges, arrays and matrices the same thing in octave? (ie the same data 
type?)

If I write a function that accepts arrays (ranges?) like sin([1:10]) how can I 
check to make sure that it's not a matrix that's actually passed in?
How do other built in functions handle this in octave?

I would like to write a function that can accept and produce arrays, can I get 
a template that can do this? ie: myFunction([1:10], 1, 2, 3)
that returns [x1, x2, x3....... x10]

thanks for clearing this up,
Chris.


reply via email to

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