Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

How to call structure value in simulink?

Asked by Arun Badigannavar on 25 Feb 2013

> Test_Structure

Test_Structure =

    a: [10 20 30]
    b: [50 60 70]

>> how to call above structure into simulink?

0 Comments

Arun Badigannavar

Tags

Products

1 Answer

Answer by TAB on 25 Feb 2013
Accepted answer

Simply put Test_Structure.a or Test_Structure.b in constant block to use their values.

3 Comments

Arun Badigannavar on 25 Feb 2013

Thanks for the answer,,but rather i am looking for something else,,,like I want a *_Test_Sructure.a(1,1),_Test_Sructure.a(1,2)*values to be assigned to only one constant vlock in a for loop,,,

TAB on 25 Feb 2013

If you want to access the elements of array, put Test_Structure.a in constant block and pass this to data port of Index vector block.

TAB

Contact us