how to initialize a mwArray
5 ビュー (過去 30 日間)
古いコメントを表示
hi,
in c++ i create an array
double c_arr_a[14];
then i put values in it
for(i=0;i<14;i++)
{
c_arr_a[i] = 0.5;
}
then i create a matlab mwArr
mwArray matlabArr(14 , 1, c_arr_a);
and i get an error. Is this not a valid mwArray initilization ?
0 件のコメント
回答 (1 件)
a tabatabaei
2015 年 9 月 15 日
mwArray constructor gives number of rows in the first parameter and number of columns in the second parameter. You should use:
mwArray matlabArr(1 , 14, c_arr_a);
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!