MATLAB Answers

convert a matrix(double) into structure

Asked by Muruganandham Subramanian on 11 Oct 2011

Hi everybody, I have done a simultion model regarding load frequency control.In that, i have transfer the output data from model to workspace by using 'to workspace' block in the format of array. Then i have to convert the array to structure with time data, then i will use 'from workspace' block to get those data to actuate another model. for ex. workspace data-->194*1 (double)..To be convert into structure with time data.

thanks in advance



No products are associated with this question.

1 Answer

Answer by Wayne King
on 11 Oct 2011

Hi, Just in case... Do you have the DSP System Toolbox (Signal Processing Blockset)?

You can use the Signal to Workspace block to directly write a structure with time data.

Also, using the To Workspace block, you can use the Save Format parameter to specify that you want to output a structure with time.

Is this what you're asking?

  1 Comment

I have tried...But it's not working..
In this i can't able take the sampled data format(i.e. for every sample of time, i need to give a data).
for ex. If am having an work space data of (194*1) in double. that same data (in either format) i need to give as a input for simulink models. Which block i should use?

Join the 15-year community celebration.

Play games and win prizes!

Learn more
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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!