Andrew Gentile wrote:
> I am trying to write a function which takes several floats as inputs,
> then returns 1x6 array of floats. I normally program in Matlab
> and I am often confused by C. It seems that
> this should be an easy task, but I can't seem to get it done.
> Can someone please include a brief snippet of code
> which demonstrates how to get a function to accept 2 floats as inputs
> and returns an array of 6 floats.
You can't return an array in C
but you can return a pointer to the first element of the array.
But it seems that you are really more interested
in returning a vector (or matrix).
Take a look at The ANSI C Numerical Class Library
http://www.netwood.net/~edwin/svmtl/
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----