MATLAB Answers


Load File into a Block

Asked by mtr
on 7 Feb 2013

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')
    fileName = handles.fileName;

But not sure how to do the next step (load into SIMULINK block). Any help is greatly appreciated!


1 Answer

Answer by Ryan G
on 12 Feb 2013
 Accepted answer

If you select the block then type


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


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 Comment

on 12 Feb 2013


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.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!