MATLAB Answers

Simulink vector to scalar stream

4 views (last 30 days)
yazz.jazz on 21 Apr 2020
Edited: bitec bit on 29 Apr 2021
I have a fixed-step (1ms) project. I have a block outputting a 7680x1 vector every 1ms. This output feeds a subsytem that does not accept vector input. Only scalar. So its giving a compile error. What can I do?

Answers (1)

Ameer Hamza
Ameer Hamza on 21 Apr 2020
See from workspace block: Create a matrix with two columns in the MATLAB workspace. The first column is the time value, spaces by 0.001 seconds, and the second column is data. This block will read the data, one value at a time.
bitec bit
bitec bit on 29 Apr 2021
hello Ameer!
i have a question here (i am facing this problem), what if the block which doesnt accept the vector is going to be a switch?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!