フィルターのクリア

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 Center および File ExchangePulsed Waveforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by