Undefined function or variable 't_x'. The first assignment to a local variable determines its class.
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Pawan Pawar
le 6 Juin 2020
Réponse apportée : Navya Seelam
le 9 Juin 2020
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/311042/image.png)
Hi all, I am trying to run this programm through Matlab function in simulink, but am getting following error.
Undefined function or variable 't_x'. The first assignment to a local variable determines its class. Function 'A_star.m' (#258.1132.1135), line 31, column 1: "t_x" Launch diagnostic report.
Component:MATLAB Function | Category:Coder error
Undefined function or variable 't_y'. The first assignment to a local variable determines its class. Function 'A_star.m' (#258.1155.1158), line 32, column 1: "t_y" Launch diagnostic report.
Can anyone help me out.
Thank You.
2 commentaires
Réponse acceptée
Navya Seelam
le 9 Juin 2020
Try initializing the variable t_x before assigning cur.x to it.
t_x = zeros(len,1);
t_x(t_count)=cur.x;
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Configure and View Diagnostics dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!