Reading existing function in MATLAB?
1 回表示 (過去 30 日間)
古いコメントを表示
I have download some function of Matlab for my project work. Now when I am running that function then it is showing error
Error: >> stlRead
Execution of script stlRead as a function is not supported:
I:\Python coding\3d\New findings\vsangelidakis\vsangelidakis-SHAPE-f97791a\lib\stlTools\stlRead.m
Error in stlRead (line 1)
[v, f, n, name] = stlRead('aggregate_1.stl');
I am attcahing the folder of the function.
0 件のコメント
採用された回答
Cris LaPierre
2024 年 4 月 23 日
編集済み: Cris LaPierre
2024 年 4 月 23 日
The issue is that your function name is strReads, not stlRead. However, it is best practice to use the same name for the function and the file. You function is actually called stlGetFormat. You should rename your file so that it has the same name as your function, and use that name to call it.
type stlReads.m
You can learn more about creating functions in MATLAB here: https://www.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html
1 件のコメント
Cris LaPierre
2024 年 4 月 23 日
unzip('aggregate_1.zip')
TR = stlread('aggregate_1.stl')
trimesh(TR)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!