How to split one input and perform different calculations on it to get different outputs.
5 views (last 30 days)
Show older comments
Zhenteng Shen
on 27 Jul 2017
Commented: Zhenteng Shen
on 27 Jul 2017
Hi everyone I am a Simulink novice, I was wondering if there is a block which take one input and performs different calculations on it and outputs them as separate outputs. So say I have 40 going in, inside the block there are different fractions to split the 40 ie, 1/2 1,4 1,6, I would have the answer to each of these fractions outputted as seperate ports on the block. Please help! Thank you!!
0 Comments
Accepted Answer
Ennio Condoleo
on 27 Jul 2017
Hi, if I have correctly understood your issue, you have a number as a single input, and you would like to have multiple outputs given by a division of the number, right? We will be able to help you a lot if you could provide us a picture of your Simulink model. However, I will try to solve your problem.
Given: N (input) R1, R2, R3 the results from the blocks which divide N by a specified quantity.
You can use mux block to create an array signal from each Ri. For instance if you have M blocks, you will have M Ri. The Mux block allows you to create an array vector whose components are R1, R2, ..., Rm respectively. Then you can use a simple Scope to view the results on can exploit To Workspace block to retrieve the results in the base workspace and then plot them by using plot function. I hope this can help you!
More Answers (1)
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!