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

7 Ansichten (letzte 30 Tage)
ac_09
ac_09 am 11 Dez. 2017
Kommentiert: KL am 11 Dez. 2017
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?

Akzeptierte Antwort

Birdman
Birdman am 11 Dez. 2017
Bearbeitet: Birdman am 11 Dez. 2017
b[j]=a;
This line should be
b(j)=a;
Also, indexing should start from 1. Be careful with that.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by