error while executing if condition

조회 수: 4 (최근 30일)
Karthick S
Karthick S 2016년 9월 19일
편집: KSSV 2016년 9월 19일
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

채택된 답변

KSSV
KSSV 2016년 9월 19일
편집: KSSV 2016년 9월 19일
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
Karthick S
Karthick S 2016년 9월 19일
Yes.. you are correct Dr. Siva Srinivas.. Thank you..

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by