error while executing if condition

4 visualizzazioni (ultimi 30 giorni)
Karthick S
Karthick S il 19 Set 2016
Modificato: KSSV il 19 Set 2016
Dear Friends
in my script coding.. i used if condition in which a solution is obtained within the condition loop and I need to call the obtained solution in subsequent step. but it gives error code: if D==d1 Test_G=1; elseif D==d2 Test_A=1; else Test_P=1; end Test_G Test_A Test_P
error: Undefined function or variable "Test_G".
Error in test_ext (line 35) Test_G

Risposta accettata

KSSV
KSSV il 19 Set 2016
Modificato: KSSV il 19 Set 2016
error: Undefined function or variable "Test_G".
The error poped out because, the condition "if D==d1 Test_G=1" might have not obeyed and it is not set. It is sense that only that output will be displayed for which the conditions obey.
  1 Commento
Karthick S
Karthick S il 19 Set 2016
Yes.. you are correct Dr. Siva Srinivas.. Thank you..

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by