convert c to matlab code
3 ビュー (過去 30 日間)
古いコメントを表示
for (ix=0; ix< iNx; ix++)
for (iy=0; iy< iNy; iy++)
{
fMeanIn += pfIm0[X(ix,iy)]*pfu[X(ix,iy)];
fNormalizationIn += pfu[X(ix,iy)];
fMeanOut += pfIm0[X(ix,iy)]*(1.0-pfu[X(ix,iy)]);
fNormalizationOut += 1.0-pfu[X(ix,iy)];
}
the above code is C code.... how to convert this into matlab code.... i'm getting error in pfIm0[X(ix,iy)].... please help me to solve it out...
0 件のコメント
採用された回答
Andreas Goser
2012 年 11 月 8 日
MATLAB start with index 1 and has no index 0.
2 件のコメント
Andreas Goser
2012 年 11 月 8 日
In my view this depends on the data going into the code. You could post dummy data like A=1:10 or B=rand(3,3) to run test code
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!