Filter löschen
Filter löschen

How to check 871 inputs in same if else block?

2 Ansichten (letzte 30 Tage)
Sandashi
Sandashi am 11 Jun. 2023
Beantwortet: Sandashi am 12 Jun. 2023
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 Kommentare
Raghava S N
Raghava S N am 12 Jun. 2023
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 am 12 Jun. 2023
thank you... i have obtained it this way too..

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Sandashi
Sandashi am 12 Jun. 2023
i have use an array as the constant.

Weitere Antworten (0)

Produkte


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by