engOpen with a dynamic variable
- From: Alwan <amdede@xxxxxxxx>
- Date: Thu, 31 Jul 2008 10:44:55 EDT
Hallo
I have tried to modify some of the example programs that come with matlab concerning the engine. For instance The program engdemo.cpp written clumsily in another way as
..
..
..
using namespace std;
#define BUFSIZE 256
int main()
{
Engine *ep;
mxArray *T = NULL, *result = NULL;
char buffer[BUFSIZE+1];
//double time[10] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 };
double* time;
int N;
cout << "Number of points"<< endl;
cin >> N;
time = new double[N];
for(int i=0; i<N; i++)
{
cout << "Please enter time span"<< i+1 << ":" <<endl;
cin>>time[i];
}
/* Start the MATLAB engine locally by .....
So I am trying to work with dynamic variable but it seems that with my programs memcpy is not functioning and my wild guess was probably because all the examples that were given are written for static variables and not dynamic.
It would be very king if you could show me how to work around this problem.
Many thanks
Alwan
.
- Follow-Ups:
- Re: engOpen with a dynamic variable
- From: James Tursa
- Re: engOpen with a dynamic variable
- Prev by Date: Re: handle to a variable
- Next by Date: Re: Problem reading data from Simulink
- Previous by thread: Fast evaluation of exponential function
- Next by thread: Re: engOpen with a dynamic variable
- Index(es):
Relevant Pages
|