Effacer les filtres
Effacer les filtres

why i have this error 'Unrecognized function or variable 'idx_start'.

1 vue (au cours des 30 derniers jours)
Edoardo Moroni
Edoardo Moroni le 12 Oct 2023
Commenté : Shivam le 2 Jan 2024
% Calcolo degli errori per ogni stato nell'intervallo di interesse
error_interval = error(idx_start:idx_end);
Unrecognized function or variable 'idx_start'.
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 commentaires
Dyuman Joshi
Dyuman Joshi le 12 Oct 2023
What is t?
Note that MATLAB is case-sensitive, so t is not equal to T.
Shivam
Shivam le 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.

Connectez-vous pour commenter.

Réponses (0)

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!