error using open line 145

조회 수: 11 (최근 30일)
Julián Espetón
Julián Espetón 2017년 6월 23일
댓글: Cam Salzberger 2017년 6월 27일
error using line 145 cannot open the import wizard on a file whiye the import wizard is open

답변 (1개)

Cam Salzberger
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');
If that works, close it with:
fclose(fid)
You can also try calling open directly on the file, and see what happens.
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
Julián Espetón
Julián Espetón 2017년 6월 24일
Import Wizard Issue
I have an issue with the Import Wizard. I want to open an image in Simulink and I can´t open it. I get the following error in the tab Import Wizard. The error message says: Preview too large to be displayed properly. The image is needed so that the block of physical systems that I want to use to control my system will work.
Thank you for your help.
Cam Salzberger
Cam Salzberger 2017년 6월 27일
I assume the Import Wizard you are referring to is the one shown in the documentation page here?
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 CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by