Load File into a Block

조회 수: 1 (최근 30일)
mtr
mtr 2013년 2월 7일
Hi All,
I am trying to load an excel file that contains my S-Parameter data into a "General Passive Network" using a GUI. I see that the General Passive Network has a location for "Data File" but I dont knwo how to pass the file to this spot.
I am able to open the file using
handles.fileName= uigetfile('.xls')
guidata(hObject,handles)
fileName = handles.fileName;
But not sure how to do the next step (load into SIMULINK block). Any help is greatly appreciated!

채택된 답변

Ryan G
Ryan G 2013년 2월 12일
If you select the block then type
get_param(gcb,'DialogParameters')
into MATLAB it will tell you the options you can change via get/set param. In this case I saw File had the file name. So you would do something like
set_param(gcb,'File',fileName)
Not sure how well this will work in that block though, it doesn't look like it expects an xls file, but a s2p type file.
  댓글 수: 1
mtr
mtr 2013년 2월 12일
편집: mtr 2013년 2월 12일
Ryan,
Thank you for the very useful info. You are correct- I learned this week that this block does not take Excel files but raw SA files (S2p etc). Appreciate the help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by