How to check 871 inputs in same if else block?

2 次查看(过去 30 天)
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
i have use an array as the constant.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by