why i have this error 'Unrecognized function or variable 'idx_start'.
3 次查看(过去 30 天)
显示 更早的评论
% 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 个评论
Shivam
2024-1-2
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.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!