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
|
|
|
| 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
| |
|
| 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
|
|
|
|
|