error using open line 145
조회 수: 11 (최근 30일)
이전 댓글 표시
error using line 145 cannot open the import wizard on a file whiye the import wizard is open
댓글 수: 0
답변 (1개)
Cam Salzberger
2017년 6월 23일
Hello Julián,
Generally it's best to copy and paste the whole error message and stack trace into your question. There are several missing parts that may have been useful to answer this.
Also, providing related information about your question would be helpful. What kind of file are you trying to import? Where is it located in your file system? What is its size? What do you expect it to contain? Can you open it with any other applications? How was it created?
Based on the information you've provided, I would guess that the Import Tool ("uiimport") calls "open", which tries to execute some kind of appropriate file-type-specific open function on the file. This fails, so "open" throws an error.
First thing I'd check is to see if MATLAB even has read-access to the file with fopen. Try this, replacing the filename with your own file name (and path if necessary):
fid = fopen('filename.ext','r');
fclose(fid)
If the file is CSV or some other delimited text file containing numbers, you can try other import data functions like readtable or dlmread.
If nothing's working for you, add more details to your question and we can maybe try to help you further.
-Cam
댓글 수: 2
Cam Salzberger
2017년 6월 27일
Is that error message actually preventing you from importing the data? If so, I'd suggest contacting technical support, since the preview failing shouldn't block the import.
If that's the case though, you can try just importing the image using standard MATLAB commands (e.g. imread) into the base MATLAB workspace, and then use a From Workspace block to load the variable into Simulink.
참고 항목
카테고리
Help Center 및 File Exchange에서 Search Path에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!