Use objects of class 'ConstantGammaClutter' only as scalars or use a cell array
1 view (last 30 days)
Show older comments
I am trying to use the ConstantGammaClutter object example MathWorks has posted and run into the above error. Here is the relevant portion of code (copied from MathWorks):
clutter = phased.ConstantGammaClutter('Sensor',array,...
'PropagationSpeed',c,'OperatingFrequency',fc,'PRF',prf,...
'SampleRate',fs,'Gamma',tergamma,'EarthModel','Flat',...
'TransmitERP',tpower,'PlatformHeight',height,...
'PlatformSpeed',speed,'PlatformDirection',direction,...
'BroadsideDepressionAngle',depang,'MaximumRange',Rmax,...
'AzimuthCoverage',Azcov,'SeedSource','Property',...
'Seed',40547);
% Simulate the clutter return for 10 pulses.
Nsamp = fs/prf;
Npulse = 10;
sig = zeros(Nsamp,Nele,Npulse);
for m = 1:Npulse
sig(:,:,m) = clutter();
end
MATLAB seems to object to my referencing clutter with parentheses, in the loop. I assume this is do to my operating MATLAB 2015b, not the current 2016b. I have virtually no experience with cell arrays so I'm not sure how to alter the above code. Help?
0 Comments
Accepted Answer
Honglei Chen
on 3 Jan 2017
This is not about the cell array since there is only one clutter object. It is really because you are using R2015b so the new syntax of running System object with the name is not supported. To get around this error, replace the line
sig(:,:,m) = clutter();
with
sig(:,:,m) = step(clutter);
it should just run fine. You can find more information about this alternative syntax in the following reference page (the first row in Common Methods table)
HTH
More Answers (0)
See Also
Categories
Find more on Transmitters and Receivers in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!