Hello!
I'm new to programming and the matlab.I have a matrix of 50000 rows and 10 columns.What i need to do is, getting rms values of every 200 rows of that matrix for each columns and then put the rms values in a new one.
I've tried this but that gives the "Index exceeds matrix dimensions."
Thanks @KALYAN ACHARJYA.
What if I try to do length(data)/200*10 matrix instead 1*10? Like every 200 rms for each row.
c=mod(length(data),200);
data=data(1:end-c,:);
for i=1:200:length(data)
dataR=rms(data(1:i,:));
end

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 12월 25일
편집: KALYAN ACHARJYA 2019년 12월 25일

0 개 추천

r=50000;
l=1;
mat_data=randi(100,[r,10]); % Here Data Matrix
result_rms=zeros(1,10);
for i=1:10
result_rms(i)=rms(mat_data(l:l+199,i));
l=l+199;
end
result_rms

댓글 수: 2

muhammet okay
muhammet okay 2019년 12월 25일
Thank you!
muhammet okay
muhammet okay 2019년 12월 25일
What if I try to do length(data)/200*10 matrix instead 1*10? Like every 200 rms for each row.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

질문:

2019년 12월 25일

편집:

2019년 12월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by