Writing a loop to check the numbers in an array do not exceed a constant value
Ältere Kommentare anzeigen
Hi, I am writing this program and need to write a for loop or similar in order to find if the values inside two arrays do not exceed a certain value
my two array/vectors are as follows. case_one,two.... are just numbers as same as W_1,2,3....
CG = [Case_one;Case_two;Case_three;Case_four;Case_five;Case_six;Case_seven;Case_eight;Case_nine;Case_ten];
W_array = [W_1;W_2;W_3;W_4;W_5;W_6;W_7;W_8;W_9;W_10];
I want to make sure these values inside do not exceed 2300 for W_array. values are within 35 - 47 for CG array. If they do exceed or not withing the range, I need to out put the text "warning". please help me with this. I am new to mathlab.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!