parse error at '=': usage might be invalid matlab syntax

7 ビュー (過去 30 日間)
ac_09
ac_09 2017 年 12 月 11 日
コメント済み: KL 2017 年 12 月 11 日
function [b]=rf_comb(l,k,H,d)
b=zeros(1,Nu); for j=0:Nu-1
X= H'*d;
a=norm(X,1);
b[j]=a;
end
end
I am getting error at "b[j]=a;" as: parse error at '='. How should i rectify it?

採用された回答

Birdman
Birdman 2017 年 12 月 11 日
編集済み: Birdman 2017 年 12 月 11 日
b[j]=a;
This line should be
b(j)=a;
Also, indexing should start from 1. Be careful with that.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by