DSP Toolbox : Array Plot Sample Increment Configuration for Simulink

조회 수: 6 (최근 30일)
Hello,
I would like to know about the configuration settings suggestion for the Array Plot module present in the DSP System Toolbox for Simulink. The model design consists of a Discrete Sine Wave generator. The Sine wave source generates 1 Hz eqivalent 'Double' sine elements with a sampling time of (1/1000) seconds.
In the Array plot, Configuration properties: -
  • X-Data mode = Sample Increment and X-Offset
  • Sample Increment = (1/1000)
  • X-Offset = 0
  1. The resultant is stepwise plot of discrete elements representing the sine wave at x=0 for all sampling times. There is no x-displacement appearing in the array plot.
  2. Second Attempt:
  • X-Data Mode = Custom
  • Sample Increment = linspace(1,100) % declared in MATLAB workspace as variable
Second Attemmpt, generates the same results as step 1.
Please advise. Thank you

채택된 답변

Kiran Felix Robert
Kiran Felix Robert 2020년 8월 26일
Hi Shashwat,
The Array plot block is used to plot vectors or arrays.
The X-axis shown in the array plot block is samples of different vectors at the same time-step. (The X-tick may or may not be integers though, depends on sample increment)
The x-axis is not the time step of your simulation nor the sample time of the input (signal) block.
For example,
If the input to Array plot block is a vector v = [1,2,3,4], and if you set the sample increment to 1, after the simulation
x-axis = 0 ,1 ,2, 3
y-axis = 1 ,2 ,3 ,4
will be the output of the Array Plot block.
The Discrete sine wave block generates a scalar output at every time step.
That is, at a given time step, input to the Array plot block is (a scalar or) a 1-element vector. So the array plot block, plots the entire sine wave at x=0 (which corresponds to vector 1), which you see at the end of your simulation.
Refer to this example for better understanding the operation of Array Plot.
To Visualize a discrete or a continuous sine wave, refer to the scope
Kiran Felix Robert

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by