How to change the function name to match its file name in a code?

조회 수: 6 (최근 30일)
Mohammad Shojaei Arani
Mohammad Shojaei Arani 2022년 12월 5일
댓글: Mohammad Shojaei Arani 2022년 12월 6일
Hello,
I have a simple question, I think!
If we have a function named hello.m but its file name is called Hi then how to change the function
name to Hi.m (to make it match the file name) NON-manually?
Imagine you need to do this for 565676577 number of files in a for-loop.
Do you know a way? it is greatly appreciated.
Babak
  댓글 수: 8
Jan
Jan 2022년 12월 5일
편집: Jan 2022년 12월 5일
@Mohammad Shojaei Arani: Please consider the Community Guidelines. SHOUTING and disrespectful communication is not welcome here.
It is useful, if you answer questions for clarifications. I have mentioned the problems of an automatic renaming already and you did not react yet. You did not clarify the problem of the confused function name "hello.m" and file name "Hi". It wastes the time of the readers, if you mention 565'676'577 files, although you have 1000 files only.
It motivates readers to assist you, if you show, what you have tried so far.
Mohammad Shojaei Arani
Mohammad Shojaei Arani 2022년 12월 6일
Soory Jan. Indeed, I am grateful to your very kind helps.
I solved my problem using your hints. Thanks!
Babak

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by