help-octave
[Top][All Lists]
Advanced

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

Passing matrices using Octave API


From: Shamika Mohanan
Subject: Passing matrices using Octave API
Date: Tue, 4 Oct 2016 14:18:17 +0530

Hello,

I'm using Octave API functions in cpp code. I have two doubts.

1. Is it possible to pass a 2D/hyper matrix from one function to another function. I need to perform operations in c++ code similar to the code given below-

foo1(iRows,iCols)
{

   ComplexMatrix matrix_double_complex = ComplexMatrix  (iRows,iCols);     
   //Perform calculations
   return matrix_double_complex;
}

foo2(matrix_double_complex)
{
   octave_value _list in(1)=octave_value (matrix_double_complex);
}

2. Is it possible to pass the entries of an octave value list from one function to another?
Something like this-

foo1()
{
   return octave_value_list in;
}

foo2(octave_value_list in)
{
   a=in(1);
   //Perform calculations
}

Can this be done using pointers? Any help would be appreciated.

Shamika


reply via email to

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