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

7 次查看(过去 30 天)
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