Output Data produced is in a 2D array instead of 1D array.

2 次查看(过去 30 天)
Hello,
I have been encountering a problem in my simulink model, hence I made a very simple model.
Input -> gain -> output
Here my input is 109*1 matrix, and I want that every time simulink picks up single value out of this 109 values (one after other) and produces a output value, thus it must produce 109values, but instead it produces 51*109 matrix. In the output; 51 rows have same value but 109 columns actually shows the multiplication.
Also a tout variable with 51 rows is being generated. I know that my output is influenced by the tout, but I really dont know how to mitigate this problem

回答(1 个)

The Matlab Spot
The Matlab Spot 2013-11-12
编辑:The Matlab Spot 2013-11-12
My understanding of the problem statement:
- Vector input of 109*1
- For every time step one value out of this vector should be used for simulation
Ans:
1. Use the Index vector block from the simulink library to iterate through the rows of this vector input
2. Simulate the model for 109 steps atleast to generate output for every value

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by