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

8 ビュー (過去 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 Center および File ExchangeString についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by