How to split one input and perform different calculations on it to get different outputs.

6 次查看(过去 30 天)
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!!

采纳的回答

Ennio Condoleo
Ennio Condoleo 2017-7-27
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!

更多回答(1 个)

KL
KL 2017-7-27
You simply connect your input block to multiple blocks.

类别

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