Compatibility between Mac and Windows MATLAB Gui

I am very familiar with MATLAB, although not so much with writing a GUI in it. Now my boss gave me a MATLAB program with a graphical interface, which was developed on a computer running Windows and works there without problems. I copied it to my mac (osx 10.6.5 with MATLAB R2009b) using a USB drive and tried to work with files on my computer.

When the GUI starts, some of the callbacks are executed, some are not. I managed to open the drawing file containing the GUI in the GUIDE but cannot click on the callback fields in the property inspector. Also, some components are not displayed in the GUIDE, which are visible when the GUI starts. At first, I suspected that it might be damaged by the changed newlines, but found out that the .fig files are binary, so this should not be. I opened the .fig binary with a text editor and found the following ASCII line, followed by the binary data:

MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Tue Aug 10 17:11:57 2010 

Are the GUIs created with MATLAB OS specific? Wouldn't that be really stupid?

I reopened the files on a Windows machine and tried to export them or save them, indicating that I want them to be compatible with other operating systems, but could not find such an option.

Of course, I researched this on google and wondered if I really didn’t find something related. If there is an incompatibility, I think that would be discussed, right?

Does anyone know about this or had the same problem before?

+6
user-interface windows matlab macos
source share
2 answers

Hmmm, good. Well, the answer is rather confusing, but still has some potential to learn from it. In the folder that my boss gave me, there were a lot of files and numbers with similar names, for example:

  • bla1.fig
  • bla.fig
  • bla0.fig

The simple problem was that the first time I opened the shape with GUIDE, I opened the shape bla.fig instead of bla1.fig. After that, I always used the re-open GUIDE function and did not see that it was always the wrong file. it caused problems.

==> so there is no incompatibility between Mac and PC, although I wonder why the platform is written in a file, and then

==> Perhaps this was a backward compatibility issue, since the original shape was created using MATLAB 5

==>, as @Adrian and @Mikhail noted: it would be very useful to use a version control system to prevent the presence of hundreds of files with different numbers, where most of them are no longer needed

+1
source share

It seems that some different versions, as well as different versions, are in my experience (MATLAB 5, 6, and 7) incompatible - I have come across similar situations many times.

I'm not quite sure when GUIDE became available with MATLAB - I first noticed this when I used the first version of MATLAB 7. (It used to be very unstable, but now it is very convenient to use. For example, I vaguely remember a critical problem with the Student version MATLAB 7. You had to download the patch for the graphical interfaces to work.)

Does your boss know how the * .fig file was created and in which version of MATLAB? Can you open * .fig on the old version of MATLAB and display the GUI correctly?

Some features may have been deprecated from an earlier version of MATLAB, which was used to create the shape and may cause some minor problems with it. If so, you can fix it by checking all the error messages and warnings that appear in the command window (or in the MATLAB console.)

In addition, you should be able to download * .fig files in the workplace using the following command from the command window, assuming the files are in the MATLAB search path.

download your_file.fig -mat

Then you should see the structure dataset and see all the properties of the drawing, etc. in this structure.

You can use this information to create a new shape without a GUIDE (GUI Development Environment / Tool).

I recommend you write your own graphical application. It is not that difficult with / without GUIDE.

I recently opened a site with some MATLAB programming tips for beginners and intermediate users and updated it in my free time. If you have any specific question about creating a GUI, I can (or cannot) provide answers there ...

-one
source share

All Articles