Ha(w) = 1./ ( ( (s./wo)+1).*( (s./wo).^2 + ((2*cos((si1)*s))./wo ) + 1 ).*( (s./wo).^2 + ( (2*cos((si1)*s))./wo ) + 1 ) ); Subscript indices must either be real positive integers or logicals.
1 view (last 30 days)
Show older comments
harsha vemulapalli
on 12 Feb 2016
Answered: Star Strider
on 12 Feb 2016
Why do I get the following error message for this equation
0 Comments
Accepted Answer
Star Strider
on 12 Feb 2016
Define all the other relevant variables such as ‘s’ and ‘wo’, then try this:
Ha = @(w) 1./ ( ( (s./wo)+1).*( (s./wo).^2 + ((2*cos((si1)*s))./wo ) + 1 ).*( (s./wo).^2 + ( (2*cos((si1)*s))./wo ) + 1 ) );
w=0:1:2000;
Haw = Ha(w);
You need to define your function as an anonymous function.
0 Comments
More Answers (1)
Roger Stafford
on 12 Feb 2016
I would guess it is caused by w in Ha(w) being neither a real positive integer nor a logical.
See Also
Categories
Find more on Beamforming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!