필터 지우기
필터 지우기

for loop to build an rfckt.cascade

조회 수: 2 (최근 30일)
ENRICO SILVESTRI
ENRICO SILVESTRI 2022년 7월 9일
답변: Abderrahim. B 2022년 7월 9일
so basically i want to build an rfckt.cascade object by inserting different objects with a foor loop. I have two differente object :
  • one is an rfckt.txline
  • the second one is an rfckt.passive
if i try to use a foor loop to add these objects it gives me and error, i really do'nt understand why. it seems like i have to manually build the object by myself. This is a short example that i found on mathwork. My idea was to build an array and then witht he foor loop build the rfckt.cascade but first of all it doesn't let me build the array in the first place
vec(1) = rfckt.amplifier('IntpType','cubic');
vec(2)= rfckt.txline;
vec(3)= rfckt.txline;
for k=1:3
casccircuit = rfckt.cascade;
casccircuit.Ckts(k)=vec(k);
end

답변 (1개)

Abderrahim. B
Abderrahim. B 2022년 7월 9일
Hope this is what you are looking for:
amp = rfckt.amplifier('IntpType','cubic');
txl1 = rfckt.txline;
txl2 = rfckt.txline;
components = {amp, txl1, txl2} ;
casccircuit = rfckt.cascade;
for k=1:3
casccircuit.Ckts(k)= components (k);
end

카테고리

Help CenterFile Exchange에서 RF Network Construction에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by