Writing a loop to check the numbers in an array do not exceed a constant value
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!