필터 지우기
필터 지우기

Use objects of class 'ConstantGammaClutter' only as scalars or use a cell array

조회 수: 1 (최근 30일)
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?

채택된 답변

Honglei Chen
Honglei Chen 2017년 1월 3일
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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Array Geometries and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by