why i have this error 'Unrecognized function or variable 'idx_start'.
3 views (last 30 days)
Show older comments
% Calcolo degli errori per ogni stato nell'intervallo di interesse
error_interval = error(idx_start:idx_end);
error_state1 = x(idx_start:idx_end, 1) - xobs(idx_start:idx_end, 1);
error_state2 = x(idx_start:idx_end, 2) - xobs(idx_start:idx_end, 2);
error_state3 = x(idx_start:idx_end, 3) - xobs(idx_start:idx_end, 3);
error_state4 = x(idx_start:idx_end, 4) - xobs(idx_start:idx_end, 4);
error_state5 = x(idx_start:idx_end, 5) - xobs(idx_start:idx_end, 5);
error_state6 = x(idx_start:idx_end, 6) - xobs(idx_start:idx_end, 6);
% Grafico degli errori per ogni stato nell'intervallo di interesse
figure(4);
subplot(3, 2, 1);
plot(T(idx_start:idx_end), error_state1, 'b', 'LineWidth', 2);
xlabel('Tempo');
ylabel('Errore');
title('Errore Stato 1 (Intervallo [5-15] secondi)');
subplot(3, 2, 2);
plot(T(idx_start:idx_end), error_state2, 'b', 'LineWidth', 2);
xlabel('Tempo');
ylabel('Errore');
title('Errore Stato 2 (Intervallo [5-15] secondi)');
subplot(3, 2, 3);
plot(T(idx_start:idx_end), error_state3, 'b', 'LineWidth', 2);
xlabel('Tempo');
ylabel('Errore');
title('Errore Stato 3 (Intervallo [5-15] secondi)');
subplot(3, 2, 4);
plot(T(idx_start:idx_end), error_state4, 'b', 'LineWidth', 2);
xlabel('Tempo');
ylabel('Errore');
title('Errore Stato 4 (Intervallo [5-15] secondi)');
subplot(3, 2, 5);
plot(T(idx_start:idx_end), error_state5, 'b', 'LineWidth', 2);
xlabel('Tempo');
ylabel('Errore');
title('Errore Stato 5 (Intervallo [5-15] secondi)');
subplot(3, 2, 6);
plot(T(idx_start:idx_end), error_state6, 'b', 'LineWidth', 2);
xlabel('Tempo');
ylabel('Errore');
title('Errore Stato 6 (Intervallo [5-15] secondi)');
6 Comments
Shivam
on 2 Jan 2024
Hi, can you provide the complete code? There is still no initialization of x, xobs, and t. Also, error_interval is not used anywhere post-initiated.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!