while using stl file i am getting Unrecognized function or variable

조회 수: 5 (최근 30일)
Sasikala J
Sasikala J 2022년 7월 14일
답변: Brahmadev 2023년 9월 7일
the file 'Aneurysm Model has done in CAD and its stl file but the out put is showing Unrecognized function or variable
smodel = createpde('structural','static-solid');
importGeometry(smodel,'Aneurysm Model.stl');
pdegplot(smodel,'FaceLabels','on','FaceAlpha', 0.5);
  댓글 수: 2
KSSV
KSSV 2022년 7월 14일
Show us the full error.
Sasikala J
Sasikala J 2022년 7월 14일
model = createpde;
TR = stlread('AneursymModel-2.stl');
importGeometry(model,'AneurysmModel-2.stl');
pdegplot(model,'FaceLabels','on')
Now used the stlread but the Error i am getting
Error using stlread (line 40)
Unable to open file 'AneursymModel-2.stl'.
Error in AneurysmModel2 (line 2)
TR = stlread('AneursymModel-2.stl');

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

답변 (1개)

Brahmadev
Brahmadev 2023년 9월 7일
Hi Sasikala,
The "Unable to open file" error is most often caused by the following reasons:
  1. Incorrect path specified: Double-check that the file path you provided is correct and points to the location of the STL file. Instead of providing a relative file path, try specifying the full file path to the STL file. For example, use something like C:\path\to\your\file.stl” on Windows or /path/to/your/file.stl” on macOS/Linux.
  2. Incorrect permissions: Ensure that you have the necessary permissions to access the file. If the STL file is located in a restricted directory, you may need to adjust the file permissions or move the file to a location accessible by MATLAB.
You can run
exist('AneursymModel-2.stl','file')
for checking if the file is in the current working directory or on MATLAB path searched by MATLAB.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by