For Programmers: Free Programming Magazines  


Home > Archive > Matlab > August 2005 > mwArray.SetData(double *, int len) doesn't support a scalar









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author mwArray.SetData(double *, int len) doesn't support a scalar
Wei

2005-08-31, 7:01 pm

I found this problem:

double v=10;
mwArray mw_v;

mw_v.SetData(&v,1); // Run time error.

The exception error message is "Index out of boundary".

If I change 1 to 0, it runs but obviously no data is transferred.

Your comments will be appreciated.

Wei
Wei

2005-08-31, 7:01 pm

mwArray mw_v(1,1,mxDOUBLE_CLASS);
Then it works.

Wei wrote:
>
>
> I found this problem:
>
> double v=10;
> mwArray mw_v;
>
> mw_v.SetData(&v,1); // Run time error.
>
> The exception error message is "Index out of boundary".
>
> If I change 1 to 0, it runs but obviously no data is transferred.
>
> Your comments will be appreciated.
>
> Wei

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com