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
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.
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!