std(x)
Why not just:Code:std(x)
I have an urgent query please do help me...I am only a beginner in MATLAB...I have a signal that has fs=1000. Its an ECG signal and has 80 leads. I have to calculate the RMS of it. When I used the code stated above MATLAB says that Subscript indices must either be real positive integers or logicals..Eagerly waiting for any reply. The factors presented below will give an idea of the Signal. please do help
Sample Start Boundary : 0 ms
Sample End Boundary : 10000 ms
Sample Rate : 1000 samples/sec
Sample Units : millimeters
Sample Gain : 10mm/mV
QRS Onset : 0 ms
QRS Offset : 50 ms
T Offset : 200 ms
Number Of LQ Channels : 16
LQ Channels : 28 29 30 40 53 54 57 58 59 60 62 65 66 70 72 75
Number Of Channels : 80
Samples Per Channel : 10000
Samples Filtered ? : No
Thanks for the reply..I am using the code sqrt(mean(Signal.^2)) where Signal is my data..But I am getting the response Subscript values must be positive or real values..Please do help me out. From the total signal I am taking a region of interest with the code Y=Signal(1500:2000)..Is this right please...And could you please tell me if there is any way i could mail you the codes and my problem..Its the last days for completion of my project and I really hope you could help me..Awaiting your earliest reply...
foo = [1 2 3 4 5];
foo = foo + 1;
t = linspace(0, (2*pi)-(2*pi/101), 101);
y = sin(t);
plot(t,y)
sqrt(mean(y.^2))
ans =
0.7071
fmt_str='%f32%f32%f32%f32%f32%f32%f32%f32%f32%f32' ;
fid=fopen('C:\Documents and Settings\labview\My Documents\Alvin data\Normal_173\Arranged Normal\Good\P0006_011030_113747_890.txt','rt');
data=cell(1,80);
data(1)=textscan(fid, fmt_str,1000,'headerLines',29);
for i=2:80;
data(i)=textscan(fid,fmt_str,1000,'headerLines',3) ;
end
fclose(fid);
Channel(28)=cell2mat(data(28));
Channel_28=reshape(Channel(28)',size(Channel(28),1 )*size(Channel(28),2),1);
Channel_28_max=max(Channel_28);
threshold=60/100*(Channel_28_max);
ind=Channel_28>threshold;
trial=Channel_28(2300:3700);
multiplied=Channel_28.*Channel_28;
squared=sqrt(multiplied);
Channel_28dcr=squared-mean(squared);
squared=squared/max(abs(squared));
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?