Filter löschen
Filter löschen

I want to use Data transform function in my scenario

1 Ansicht (letzte 30 Tage)
MUHAMMAD ADNAN
MUHAMMAD ADNAN am 3 Mai 2022
Beantwortet: Manas Shivakumar am 13 Okt. 2023
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

Antworten (1)

Manas Shivakumar
Manas Shivakumar am 13 Okt. 2023
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!

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by