Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matlab/Octave: OCTAVE_VERSION instead of ver #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carandraug
Copy link
Contributor

This is the recommended method to distinguish between Octave and Matlab.

ver returns a struct array, one element for Octave and another for each of the installed packages. It is not documented that the first element will be Octave. This method is also much simpler.

@cjlin1
Copy link
Owner

cjlin1 commented Apr 18, 2015

Many thanks. This will be updated in the next release.
Carnë Draug writes:

This is the recommended method to distinguish between Octave and Matlab.

ver returns a struct array, one element for Octave and another for each of the
installed packages. It is not documented that the first element will be Octave.
This method is also much simpler.


You can view, comment on, or merge this pull request online at:

#30

Commit Summary

  • Matlab/Octave: use the standard method of checking OCTAVE_VERSION to
    distinguish between the two.

File Changes

  • M matlab/make.m (3)

Patch Links:


Reply to this email directly or view it on GitHub.*

@infwinston
Copy link
Contributor

@carandraug
"exist ("OCTAVE_VERSION", "builtin")" will not work for Matlab, since double quotation is invalid in Matlab.
I think it should be modified to "exist ('OCTAVE_VERSION', 'builtin')"?
Thanks.

@carandraug
Copy link
Contributor Author

@infwinston you are absolutely right. I only test this in Octave and this is one of the things that always catches me my surprise.

I have force pushed a new commit with the right quotes for Matlab compatibility.

cjlin1 pushed a commit to cjlin1/liblinear that referenced this pull request Jun 29, 2015
…distinguish between the two.

Commented by Carnë Draug <[email protected]>

See the pull request for details: cjlin1/libsvm#30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants