필터 지우기
필터 지우기

Issue regarding loop to find Root mean square error in MATLAB

조회 수: 2 (최근 30일)
Muhammad Nauman Nasir
Muhammad Nauman Nasir 2017년 7월 24일
댓글: Kristen Amaddio 2017년 7월 27일
I have 6 different data sets from sensor and I want to find out the Root mean Square error but of the limited signal with limits means RMSE of sig_diff_lim.
I have tried to apply loop but it’s not working can anybody tell me where I am at fault.
Thanks in anticipation.
clc
drv(1)=load('a.mat');
drv(2)=load('b.mat');
drv(3)=load('c.mat');
drv(4)=load('d.mat');
drv(5)=load('e.mat');
drv(6)=load('h.mat');
for i= 1:numel(drv)
t=drv(i).T;
ref=drv(i).P;
lws=drv(i).SWA;
sig_diff(i,:) =lws(i)-ref(i);
swvel_thres=10;
vehvel=30;
SAmax=90;
sig_diff_lim(i,:)=sig_diff((lws_7(i)<SAmax)&(lws_7(i)>-SAmax)&(swav(i)<swvel_thres)&(vel(i)>vehvel));
square_error(i,:) = (sig_diff_lim(i)).^2;
mse(i,:)= mean(square_error(i));
rmse(i,:) = sqrt(mse(i));
end
rmse
mse
  댓글 수: 1
Kristen Amaddio
Kristen Amaddio 2017년 7월 27일
What issue are you experiencing? Is the code resulting in an error? Are the outputs not what you expect? It is hard to tell what might be going wrong without having an example MAT-file that reproduces the issue.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by