Use objects of class 'ConstantGammaClutter' only as scalars or use a cell array
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dean Ranmar
il 3 Gen 2017
Commentato: Dean Ranmar
il 4 Gen 2017
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 Commenti
Risposta accettata
Honglei Chen
il 3 Gen 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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!