フィルターのクリア

How to check 871 inputs in same if else block?

2 ビュー (過去 30 日間)
Sandashi
Sandashi 2023 年 6 月 11 日
回答済み: Sandashi 2023 年 6 月 12 日
Please help me to resolve this, i am new to simulink and have time-sensitive research work.
I have set of constant inputs (871 of different values from 413.16 to 500.16 incremented by 0.1) which need to be proceed in a set of arithmatic steps and finally check which of them having outputs greater than 1? i need to selct first input which is having output greater than 1? i have tried to input for loop for it but not succeed.
i will attach my developed model where i have bud up logic only for one constant? ( in this else block i want to repeat same process untill get sum geater than 1)
please help me....
  2 件のコメント
Raghava S N
Raghava S N 2023 年 6 月 12 日
Step 1: Write your inputs into a variable.
Step 2: Convert that variable into a mat file by running the save command.
Step 3: Convert the .mat file into a Simulink compatible dataset.
inputData = 413.16:0.1:500;
save('inputData.mat','inputData');
success=convertToSLDataset('inputData.mat','SimulinkInputData.mat');
Step 4: Add an inport to your Simulink model. Under the Main tab in the block parameters, click on the connect inputs button. This opens the root input mapper dialogue box.
Step 5: Click the From MAT-file button in the Links section of the toolstrip in the root input mapper
Step 6: Browse to SimulinkInputData.mat and include it. Set the map mode to port order under the map configurations section of the root input mapper toolstrip. Click on save in the root input mapper and give it any name. Click on apply to model in the root input mapper and close the dialogue box.
Step 7: In the Signal attributes tab of the block parameters dialogue box of the iport, set variable signal size option to no and port dimensions to the input size of your array.
Step 8: add an output port as your output.
Sandashi
Sandashi 2023 年 6 月 12 日
thank you... i have obtained it this way too..

サインインしてコメントする。

採用された回答

Sandashi
Sandashi 2023 年 6 月 12 日
i have use an array as the constant.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSources についてさらに検索

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by