Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Can someone please explain me the code and how can i give my input in it?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I want a kalman filter with two inputs and one output port; 1st Input is a excel sheet with 16801x28 and 2nd is a sample of which i want to see how close are the values to the original which again is a excel sheet of 6rows and 28 columns. Can someone please explain the code given below and tell me where can i input my two excel sheet inputs Thanks in advance
numSamples = 4000;
R = 0.02;
src = dsp.SignalSource;
src.Signal = [ones(numSamples/4,1); -3*ones(numSamples/4,1);...
4*ones(numSamples/4,1); -0.5*ones(numSamples/4,1)];
tScope = dsp.TimeScope('NumInputPorts', 3, 'TimeSpan', numSamples, ...
'TimeUnits', 'Seconds', 'YLimits',[-5 5], ...
'ShowLegend', true); % Create the Time Scope
kalman = dsp.KalmanFilter('ProcessNoiseCovariance', 0.0001,...
'MeasurementNoiseCovariance', R,...
'InitialStateEstimate', 5,...
'InitialErrorCovarianceEstimate', 1,...
'ControlInputPort',false); %Create Kalman filter
while(~isDone(src))
trueVal = src();
noisyVal = trueVal + sqrt(R)*randn;
estVal = kalman(noisyVal);
tScope(noisyVal,trueVal,estVal);
end
I have taken this code from http://in.mathworks.com/help/dsp/ref/dsp.kalmanfilter-class.html#bt0lhkw-3
1 comentario
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!