Hi everyone, I need your kind and urgent assistance on this RMS code i run on my system. kindly assist me with the correction of this code on RMS.
Thanks in anticipation.
MATLAB CODE IS :
clear all; close all; clc;
V=1;
ch=0.2;
Y=0.5;
q1=0;
q2=0;
p1=0.2;
E=0.2;
p2=sqrt(2*E- p1^2);
dt=1/5;
fs=1/dt;
tspan=100:dt:1000;
K=[0 0.01 0.021 0.022790 1.5];
m=length(K);
for c=1:m;
[t{c},x{c}]=ode23tb(@(t,x)TH(t,x,ch,V,Y,K(c)),tspan,[q1 q2 p1 p2]);
end
Y=x{:,1};
Z=x{:,2};
P=x{:,3};
T=x{:,4};
G=x{:,5};
Time=0:0.001:5;
T = Time(2)-Time(1);
Fs = 1/T;
L = nume1(Time);
Disp_Data1 = (Y(:,1));
M_Data1 = mean(Disp_Data1);
RMS_data1= rms(Disp_Data1);
Disp_Data2 = (Y(:,2));
M_Data2 = mean(Disp_Data2);
RMS_data2= rms(Disp_Data2);
subplot(2,1,1)
plot(Time,Disp_Data1);
hold on;
plot(Time,Disp_Data2);
MATLAB ERROR:
Undefined function or variable 'nume1'.
Error in Rms (line 26)
L = nume1(Time);
>>

Antworten (1)

Star Strider
Star Strider am 16 Aug. 2021

0 Stimmen

l ~= 1

3 Kommentare

OGUNGBEMI Ezekiel
OGUNGBEMI Ezekiel am 16 Aug. 2021
Thanks, but it is given me this error:
Error using plot
Vectors must be the same length.
Error in Rms (line 36)
plot(Time,Disp_Data1);
>>
OGUNGBEMI Ezekiel
OGUNGBEMI Ezekiel am 16 Aug. 2021
and this error again using l ~= 1
Undefined function or variable 'l'.
Error in Rms (line 26)
l ~= 1;
>>
Star Strider
Star Strider am 16 Aug. 2021
I was subtly demonstrating that you have a typographical error in your code.
Substitute: numel for nume1.
.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Exponents and Logarithms finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2016a

Gefragt:

am 16 Aug. 2021

Kommentiert:

am 16 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by