error using open line 145

8 views (last 30 days)
Julián Espetón
Julián Espetón on 23 Jun 2017
Commented: Cam Salzberger on 27 Jun 2017
error using line 145 cannot open the import wizard on a file whiye the import wizard is open

Answers (1)

Cam Salzberger
Cam Salzberger on 23 Jun 2017
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 Comments
Julián Espetón
Julián Espetón on 24 Jun 2017
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 on 27 Jun 2017
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.

Sign in to comment.

Categories

Find more on Search Path in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!