How do I open my matlab figures?

4 visualizaciones (últimos 30 días)
LAWRENCE EDOMWONYI-OTU
LAWRENCE EDOMWONYI-OTU el 12 de Feb. de 2015
Editada: Stephen23 el 12 de Feb. de 2015
"Error using open (line 163) Unable to read MAT-file C:\Users\user\Documents\MATLAB\u.fig: not a binary MAT-file. Try LOAD -ASCII to read as text."
I saved the figures but while some can be opened, others are not and they come up with the message as given above. I don't know what to do. I also observed that while the good ones are in the size range of 20kb, these ones that cant be opened are in the size range of 50 to 60kb. I tried renaming but it wont work.
Some of the files are attached. The u'2.fig files are the problem files. The v'2.fig are good. Please do try to open them and advice me what to do.
Many thanks
Lawrence

Respuestas (1)

Stephen23
Stephen23 el 12 de Feb. de 2015
Editada: Stephen23 el 12 de Feb. de 2015
First I removed that ' from the names, this will only make things confusing in MATLAB.
Lets investigate this by opening the files in a text editor:
The file v2 starts with the line MATLAB 5.0 MAT-file, Platform: PCWIN, ... and continues with a whole lot of binary data. This is a healthy .FIG format.
The file u2 starts with ÿØÿà JFIF.... This is clearly not a .FIG format. What is more, JFIF stands for "JPEG File Interchange Format", which is not a .FIG file.
  4 comentarios
LAWRENCE EDOMWONYI-OTU
LAWRENCE EDOMWONYI-OTU el 12 de Feb. de 2015
Thanks a lot Stephen for your time. I will have to do my analysis again. I know I opened the files and obtained the images in Matlab then saved them in Matlab files. I don't know how they got a JFIF file extension. I have looked at the properties too and it showed .fig file type which is what all other Matlab images carry. Really confused here. Thank you
Stephen23
Stephen23 el 12 de Feb. de 2015
Editada: Stephen23 el 12 de Feb. de 2015
"I don't know how they got a JFIF file extension": actually they all have the .FIG extension. The question is: how did they all end up with the .FIG extension?
It is important to understand the difference between an image and a figure:
  • an image ( .PNG, .JPG, etc) can be opened by imread and saved by imwrite. There are lots of other image manipulation functions too.
  • a figure contains the data required to create a MATLAB figure. A figure can be saved using saveas or savefig, and read using open.

Iniciar sesión para comentar.

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by