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 CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by