how to pick 25th % and 75th% number of data from 200x200 matrix

조회 수: 5 (최근 30일)
Adil Sardar
Adil Sardar 2023년 2월 2일
댓글: Adil Sardar 2023년 2월 2일
I want tick only the data which occur on 25% and 75% of the data and subtract the value of the data wihich occur on 25% from the data which occur on 75% and save it in another array. like in the excel sheet i just do it manually.

채택된 답변

Arif Hoq
Arif Hoq 2023년 2월 2일
편집: Arif Hoq 2023년 2월 2일
a=randi(100,200,200); % your data matrix(200 x 200)
data25=a(25,:)/100; % percentage
data75=a(75,:)/100; % percentage
new_array=data25-data75;
Or if you don't want to calculate without percentage
new_array=a(25,:)-a(75,:);
  댓글 수: 2
Adil Sardar
Adil Sardar 2023년 2월 2일
Thank you for your time but in your code you take the percentage of the 25th number I need the code which select the data on 25% of the total data, like 25% of 200 is 50 so I need the data which is on 50th number. same like for 75%, 75% of 200 is 150 select the data which is on 150th number. then subtract the 150th number data from 50th number..
Adil Sardar
Adil Sardar 2023년 2월 2일
Thank you I got it. your code help me

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by