why i have this error 'Unrecognized function or variable 'idx_start'.
Mostrar comentarios más antiguos
% 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 comentarios
Dyuman Joshi
el 12 de Oct. de 2023
Because you have not defined what idx_start (and idx_end) is.
What value should MATLAB use for the parameter?
Edoardo Moroni
el 12 de Oct. de 2023
Dyuman Joshi
el 12 de Oct. de 2023
Did you not read my comment?
You asked - why i have this error 'Unrecognized function or variable 'idx_start'.
I replied - Because you have not defined what idx_start (and idx_end) is. What value should MATLAB use for the parameter?
Edoardo Moroni
el 12 de Oct. de 2023
Dyuman Joshi
el 12 de Oct. de 2023
What is t?
Note that MATLAB is case-sensitive, so t is not equal to T.
Shivam
el 2 de En. de 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.
Respuestas (0)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!