필터 지우기
필터 지우기

I want to use Data transform function in my scenario

조회 수: 1 (최근 30일)
MUHAMMAD ADNAN
MUHAMMAD ADNAN 2022년 5월 3일
답변: Manas Shivakumar 2023년 10월 13일
Hello All,
I am new to Matlab and I am looking forward to get idea from you people that I want to take only function which is called data transform function which is mentioned in the following link. The thing is that, If I copy and paste in my working folder ( because i want this function only), so the functions, variables associated with this also mentioned in the other functions... so it is problem for me to understand. Please help me in this regard and give me useful suggestion that how i can use this function and apply this function to my own dataset.
Regards
Adnan
https://www.mathworks.com/help/deeplearning/ug/point-cloud-classification-using-pointnet-deep-learning.html#PointCloudClassificationUsingPointNetDeepLearningExample-17

답변 (1개)

Manas Shivakumar
Manas Shivakumar 2023년 10월 13일
Hello Muhammad Adnan,
I understand that you wish to use the function ‘dataTransform’ in your own program.
Yes, you can directly use the dataTransformfunction in your own program, even if the variables defined inside the function have the same names as variables defined in other parts of your code or other functions. This is because variables defined within a function have a local scope, meaning they are only accessible within that specific function. Variables with the same name in other parts of your code or other functions will have different scopes and will not conflict with the variables used in the 'dataTransform' function.
Using the same variable names in different parts of the code or functions is a common practice to improve code readability. While theoretically, there is no requirement to have the same variable names, it is often done for practical reasons and to make the code more understandable.
Alternatively, you can copy the function to a separate file and invoke that function from the main program. This should eliminate the confusion of having the same variables being used in multiple places in one single file.
To learn more about variable scopes in MATLAB, refer to this documentation: https://in.mathworks.com/help/matlab/scope-variables-and-generate-names.html
Hope this information helps!

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by