How to call a matlab function?
1 回表示 (過去 30 日間)
古いコメントを表示
I have to verify that my matrix code is correct by checking that for a 5x5 matrix, SS=I_5. How do I do that? This is the code I have for returning a matrix S of any size.
function S = S_Matrix(m)
S=zeros(m)
for ii= lim ;
for jj= lim ;
S(ii,jj)= sqrt(2/m)*sin*((pi/m)*(ii-(1/2))*(jj-(1/2)));
end
end
end
1 件のコメント
Rik
2020 年 11 月 23 日
Where is the function definition of lim?
Did you follow a basic Matlab tutorial?
回答 (1 件)
Chaitanya Mallela
2020 年 11 月 27 日
The above code cannot be executed as lim is not defined. Try initializing lim either as a variable or function with integer return value.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Segmentation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!