Anybody know what is the correct way to code on line 30. I try to find the locat
ID: 3906598 • Letter: A
Question
Anybody know what is the correct way to code on line 30. I try to find the location of of an element which is >.3 on 1st colomunn and >.2 on second column of A4
6 Deskop ENGI1331 1331Midterm1ReviewSession Editor-CAUserslyic16 Desktop LENGI133111331Midterm MA2 ychen221.m MA3 ychenz21.mICA ychen221.m Untit X Untitled-m- Problem.pdf 28 29 30 31 32 fprintf (' There are %0.0f schools in dis fprintf(' There are %0.0f schools in distr?ce are outstand perfo [M8,L9]-find (A4 (,1)>0.30, A4 (,3) >0.20): L10-size (L9) ; ct írct are underperform , l L5(:,1)); Names2-School Names (M4(: ,1)): save ( ' Underperforming. Schools. mat ' ,' Name 32" ) ; 34 35 36 Variables A4 Conditions XI B X?A X| A4 26x3 double 10 12 0.5000 0.5833 0.5955 01695 0.6271 0.2034 0.2439 0.2121 0.2360 0.2561 0.2045 0.1685 4 0.3289 0,4211 1102500 Command Window Ihe totai number ot tne elemtary school in aistrct is 26 The Robinson Elementary has the highest percentage of the lowest reading rate. The Hyde Elementary has the highest percentage of the on target reading rate . The Ward Elementary has the highest percentage of the above average reading There are 9 schools in disctirct are underperformed There are 12 schools in districe are outstand performing.Error using find Second argument must be a positive scalar inceger Error in Untitled3 (line 30)Explanation / Answer
If you want to get the index location of the value greater than 0.3 in 1st column and greater than the value 0.2 in second column of the matrix A4, then this can be achieved by following line of code.
[M8, L9] = find( A4(:, 1) > 0.30 & A4(:, 2) > 0.20 )
Please note that in the question it hase been asked to find the required index location in the columns 1st and 2nd of matrix A4 but in the code screenshot you have coded the same for the columns 1st and 3rd. Hence I have posted the code above for the 1st and 2nd column, but if you want to do it for the latter case then replace 2 with 3 after the & symbol given in A4(:, 2) with A4(:, 3)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.