필터 지우기
필터 지우기

VAriables of a function inside a function

조회 수: 1 (최근 30일)
RAKESH KUMAR TOTA
RAKESH KUMAR TOTA 2021년 9월 9일
댓글: DGM 2021년 9월 9일
Good morning,
I am runnung iterative loop
loop(arg) where arg is a number to specify matlab how many times to run the loop(arg)
There are certain function inside the loop(arg) to run simulation and followed by convergence criteria inside a loop(arg)
My question is i need to extract global variable 'rxf' assigned and present inside a loop(arg) to be used in a function where loop(arg) executed inside that function. But i observe error Unrecognized function or variable 'rxf'.
Any idea how to resolve this issue.
Thank you in advance.
  댓글 수: 6
RAKESH KUMAR TOTA
RAKESH KUMAR TOTA 2021년 9월 9일
Problem resolved. Thank you for your response.
i need to define again global variable inside the function which i used in loop(arg) ---> rxf it seems now it is not showing any error.
DGM
DGM 2021년 9월 9일
FWIW, calling a function in an anonymous function doesn't imply the same variable scoping rules that apply to functions with nested scopes.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by