Test for compatibility in Matlab - matlab

I'm working with an open source Matlab toolbox which, according to its creators, is compatible for versions of Matlab over 7.6, i.e., R2008a. I tried to run it in R2011b and it threw the exception: Undefined variable "Simulink" or class "Simulink.Mask.create"
Since:
1- Simulink is installed and functional in this R2011b;
2- I have already run the same code in a R2014b successfully;
I conclude that this is a problem of compatibility -In contrast to their claim, their code is compatible for some version later than R2011b-.
I wish I could contribute with them by directly telling them, not only that their code is not compatible with Matlab 7.6, but also the earliest version in which the statement associated with Simulink.Mask.create would run.
So, in precise terms, MY QUESTION IS: Given a command, built-in function, namespace resolution sequence, or whatever feature that I can find in some version of Matlab, what is the way of knowing what is the earliest version in which that feature is active?
I have tried http://www.mathworks.com/help/simulink/release-notes.html which is not searchable or navigable the way I wish it was.

This is a common problem. This page talks of the same problem - claiming that there is no good solution... It does however come with a smart way of searching through the release notes:
Click on the bottommost unexpanded release, to expand the it.
Click on "expand all" all link to expand all link just below.
If any unexpanded releases remain goto 1.
Now use the browser search functionality (often ctrl+f) to search the fully expanded page.
Good luck!
EDIT:
To see older releases too you need to start with the following step:
0: Click the link in the bottom saying "View release notes for older releases".
And then continue like above.

I don't think there is a straightforward way to find what you want.
In my opinion you have to do it manually for each version of MATLAB
in order to find is certain feature supported or not.
Some feature may be obsolete or may exist a bug.
So the best way to do is :
A) Look at particular version of relase notes, for example ,let say R2011a
New Features, Bug Fixes, Compatibility Considerations
click on "expand all", then use find "your keyword" in your browser
( be careful about case sensitivity)
You also have "Compatibility Summary", search it, too.
B) If something is very important and you are sure there is an issue
just email to customer service and ask for further steps
and who may contact further.

Related

Unity C#: How to rebind buttons via script while game is running?

Title says it all, I'd like to implement a controls menu so the player can rebind controls, which changes the positive input key of a button in the Input Manager. But I can't find anything about it online.
How would I go about changing the positive key for a button while ingame?
Unfortunately, I believe you can't set Input Manager values via code at all. That's probably why you didn't find anything about it.
You've got two alternatives:
Use the "Input System" aka. the new input system that is available as a package. It is not as easy to use as the legacy input system, but you should check it out. It's also open source.
Use an asset store package. I've tested Rewired in the past and found it extremely powerful, especially compared to the legacy input system.
Personally, I'd first go with option 1 and see if you are happy with it. It's an official package and not 3rd party. Option 2 is still there, if you have issues with option 1, but it'll probably cost you money.

VSCode not recognizing all .clang-format options

I'm the kind of person who would systematically go through every single option available to toggle, and this time it's with clang-format in VSCode. I found this, which I'm assuming lists every single thing available to cram into a .clang-format file for VSCode to use. Unfortunately, VSCode seems to not recognize a handful of them:
BitFieldColonSpacing
BreakBeforeConceptDeclarations
EmptyLineBeforeAccessModifier
IndentAccessModifier
IndentRequires
SortIncludes
SpaceAroundPointerQualifiers
SpaceBeforeCaseColon
Out of the handful of options that VSCode fails to load, only SortIncludes is recognized at all, but it only accepts a bool, not the options that the reference says are available. The rest of the options are outright not recognized:
YAML:xxx:xxx: error: unknown key 'xxx'
Error reading /path/to/.clang-format: Invalid argument
Could I be missing something, or does VSCode not support those options? I'm using the C/C++ extension by Microsoft, using VSCode on Linux.
Thank you for your time.
Quickish answer: This is not a bug. At least some of those options (IndentAccessModifiers) are still in the "Work In Progress" clang 13. You would need to (download and) replace the underlying clang-format binary in order to use these new features.
For whatever reason, the clang-format page describing the various options defaults to showing you everything in version 13, but does not actually warn you that these are not official release versions. Nor does it at least tell you what version a feature was introduced. It's not until you do a little digging that you find out that the main documentation page is not what you want. The most recent VSCode uses version 11.1.0, and you can find the matching options here: ClangFormatStyleOptions version 11.1.0
FUTURE NOTE: This answer mostly only applies today May 27, 2021. This may not apply 6 years down the line and VS Code is now at version 22 of clang. That said, you may find this useful if you come across this same type of issue in version discrepancy.

Recommendation Add-On in Orange

I want to explore the use of the recommendation add-on in my class later this semester. The Add-On does not appear in the list that comes with the interface, but when I click add-more in the upper right, and type Recommendation, a list appears in the box along with an associated version number, currently 0.3.1.
I select to install, Orange tells me to restart the program, and when I do, the widgets and section Recommendation are not visible in the UI, and the Add-on is not visible within the Add-on sections as well. If I type Recommendation to "Add more" again, I see it checked and it suggests that it is installed.
Is there a setting that needs to be adjusted for this toolset to appear via the UI?
After poking around, thankfully due to the Related questions, there was a similar issue with the Bioinformatics.
To install the package above, instead of typing Recommendation, we need to use orange3-recommendation.
That did the trick.

Automated function hints tool in Matlab

I have worked shortly with Netbeans using Java and use eclipse for school projects, where I noticed there are some really cool features like it will show built-in functions on ctrl-space or it will suggest from existing variables. I recently started using matlab, I was wondering if there are any such tools available in the matlab. I know it's a scripting environment so things are probably a little different but then I wonder people who work with extensive projects with matlab, how would they manage the codes or cross-develop without such tools. I searched mathworks but could not find any useful information on that.
Anyone knows if such tools or add-ons existe for matlab? Thanks in advance guys!
As mentioned before, autocomplete works for functions, variables and fields.
If it seems to fail to work for a field (perhaps because your workspace is not properly set up) it can help to call the field without index:
For example:
entity.field instead of entity(i).field
Also if you change the workspace frequently it may be that the mfile editor does not catch up, in that case a quick workaround is to just type in the command window and copy afterwards.
As mentioned before the variables need to be in workspace.
I often approach so that I evaluate the code as I write it like this:
Write the code in cell mode
Evaluate cell with [ctrl - enter] - or button in menu bar.
Write next cell (variables of previous blocks are now available in workplace, autocomplete with tab)
There is also a matlab mode for emacs. It offers some autocomplete functionality and has a nice feature to wrap long code lines.
unfortunately on windows it lacks the ability to evaluate cells. So I rarely use it.
There are some similar design in MATLAB, one of them is called function hints.
You could find the documentation for it in here: http://www.mathworks.com/help/matlab/matlab_env/check-syntax-as-you-type.html

From Eclipse to IntelliJ

I know some (crazy) people want to move from IntelliJ to Eclipse. On my side, I am moving the "normal way", i.e. from Eclipse 3.3 to IntelliJ 8.0.1
I really like it, but I am a little lost sometimes.
Do you know any specific IntelliJ guide or tutorial created specifically for Eclipse users?
For example, after some tests, I missed some options usefull on Eclipse (I don't say they don't exist in IntelliJ, I just say that I didn't find them !):
Automatic insert at the correct position of the ';' character
Actions made on save (format, reorganize and clean imports)...
Check this FAQ in the Jetbrains home page: link. It is not a guide or tutorial, but it goes through some basic concepts that Eclipse users should accustom themselves with when they move.
For automatically inserting ';' at the correct position (as well as braces) the last time I've looked (probably Idea 6, maybe 7) it didn't exist. My colleagues always wonder why I insert ';' in stupid places when I'm pairing with them. I told them to notify me when this feature becomes available in Idea, but until now they didn't.
There's the two topmost related questions (see right column) covering "Things possible in A that aren't possible in B" for both directions - you might find ideas there as well as in the comments to the answers where people tell you what to alternatively do.
Edit (maybe this is better here than in the comments);
...it seems to be somewhat possible. See the comment to my answer to the related question: . One could argue that CTRL-SHIFT-ENTER is less intuitive than ';', but in Idea you get used to type a lot more of such shortcuts than in eclipse... This comes closest to the functionality you asked for. Hope it helps...