Thread Subject: Plot a signal from simulink v.s. time step index

Subject: Plot a signal from simulink v.s. time step index

From: Mike

Date: 13 Jun, 2008 03:43:02

Message: 1 of 4

Hello,

1. Does anyone know how to plot a signal generated by
Simulink (FixedStepDiscrete solver) versus time step
index?

2. Does anyone know how to query to get the simulation
time step size for a model with FixedStepDiscrete
solver?

3. Does anyone know if there is a way to display
multiple signals on one page for signals generated
in 1 and with a cursor in there for all of them?

Thanks,

Mike

Subject: Plot a signal from simulink v.s. time step index

From: Pedro Villena

Date: 13 Jun, 2008 04:56:01

Message: 2 of 4

Hi Mike,

1. The best and easier way is to save data in workspace,
then you can plot it vesus Time Step Index.

2. To get the simulation option structure use the
command 'simget'. Example:
>> simget('untitled','FixedStep')

3. You can display multiple signal using the block 'mux'.

Regards,
Pedro

Subject: Plot a signal from simulink v.s. time step index

From: Pedro Villena

Date: 13 Jun, 2008 04:57:01

Message: 3 of 4

Hi Mike,

1. The best and easier way is to save data in workspace,
then you can plot it vesus Time Step Index.

2. To get the simulation option structure use the
command 'simget'. Example:
>> simget('untitled','FixedStep')

3. You can display multiple signal using the block 'mux'.

Regards,
Pedro

Subject: Plot a signal from simulink v.s. time step index

From: Mike

Date: 13 Jun, 2008 16:15:03

Message: 4 of 4

Thanks Pedro,

"Pedro Villena" <pedro.villena.nospam@ieee.org> wrote in
message <g2sumt$rl2$1@fred.mathworks.com>...
> Hi Mike,
>
> 1. The best and easier way is to save data in workspace,
> then you can plot it vesus Time Step Index.

Yes, it would be nice if Simulink has block that can
automatically does all this.

>
> 2. To get the simulation option structure use the
> command 'simget'. Example:
> >> simget('untitled','FixedStep')

Yes, but it just returns whatever I set in the Solver
pane for Fixed-step size field. If it is 'auto', I expect
to get the actual step size used by the simulator, however,
it just literally returns the string 'auto'.
 
> 3. You can display multiple signal using the block 'mux'.

Yes, however, I wish to have a cursor that will give me
the step index and the vaule of the signal at that step.
 
> Regards,
> Pedro

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
simulink Pedro Villena 13 Jun, 2008 01:00:08
discrete Mike 12 Jun, 2008 23:45:06
simulink Mike 12 Jun, 2008 23:45:06
fixed step Mike 12 Jun, 2008 23:45:06
sample based Mike 12 Jun, 2008 23:45:06
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com