I want to use Data transform function in my scenario
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Manas Shivakumar
on 13 Oct 2023
Hello Muhammad Adnan,
I understand that you wish to use the function ‘dataTransform’ in your own program.
Yes, you can directly use the ‘dataTransform’ function 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!
0 Comments
See Also
Categories
Find more on Get Started with Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!