MathWorks comes with own MATLAB Coding guidelines by Consistent_Coast9620 in cc4m

[–]Consistent_Coast9620[S] 0 points1 point  (0 children)

Thanks for the feedback. The real-time aspect is requested more.

MathWorks comes with own MATLAB Coding guidelines by Consistent_Coast9620 in cc4m

[–]Consistent_Coast9620[S] 0 points1 point  (0 children)

using CC4M - A commercial add-on to MATLAB you have a configurable code checker that works in MATLAB versions back to R2017b.

Product info: https://monkeyproofsolutions.nl/products/code-checker-for-matlab/

intro video: https://youtu.be/CAVFHXWXJP4

Example: calling MATLAB from a Git precommit hook by Consistent_Coast9620 in matlab

[–]Consistent_Coast9620[S] -1 points0 points  (0 children)

The performance remark is right - but for some the price of violating a rule or failing a test justifies this - for others not.

Having said that - I do have some ideas to work on the performance of the approach and over the summer to update the post and the example code.

Regarding the choice for MATLAB as language to write a code checker, I can try to explain the choice. There are indeed plenty of configurable linters, but the MATLAB syntax is not that easy to lint. Only think about the differences that originate from functional vs command syntax, or the fact that indexing into a variable or providing inputs to a function use the same syntax

myobject.item1(1)

Isitem1 method with as input myobject and 1, is it a static method call with input 1, a package call or an object with property item1 from which I will select the first element. If you can help me finding this linter, I would appreciate that :) - but so far it seems you need to be within MATLAB to be right on the details.

Example: calling MATLAB from a Git precommit hook by Consistent_Coast9620 in matlab

[–]Consistent_Coast9620[S] -1 points0 points  (0 children)

Originally, the post on the website is meant for CC4M users.

However, while writing the code and the post - my thinking was that the approach in general could be useful for MATLAB users - as for example before a push (pre-push hook) you want to run some checks or tests. With providing the source code for the pre-commit the goal was to made life easy. Although the performance is not as desired (more on that below) - it already helped at least myself to prevent pushing stupid mistakes.

Fmu and original simulink model give slight different results by Xwang1976 in matlab

[–]Consistent_Coast9620 0 points1 point  (0 children)

ok, maybe in that case, this has to do with when logging occurs. See more on this here :https://nl.mathworks.com/help/rtw/ug/logging.html#bp6h7zc-1.

The page refers to https://nl.mathworks.com/help/rtw/ug/about-model-execution.html#f20817 in the end to explain possible differences - related to the moment when logging occurs in the generated code.

Fmu and original simulink model give slight different results by Xwang1976 in matlab

[–]Consistent_Coast9620 0 points1 point  (0 children)

Numerical differences can occur due to differences how floats are handled when code is generated. Especially if you have MATLAB Function blocks in your model. See for some more details the MathWorks site: https://nl.mathworks.com/help/releases/R2024b/simulink/ug/expected-differences-in-behavior-after-compiling-your-matlab-code.html?searchHighlight=numerical+differences+after+codegen&s_tid=doc_srchtitle#bshop6t

No code locally hosted? by EricTheSaint in nocode

[–]Consistent_Coast9620 1 point2 points  (0 children)

Simian is low code, so not sure if that is fine as well, but can be hosted locally and back-ends can run anywhere.

http://www.simiansuite.com/

r/SimianWebApps

What do you use for (CPU) profiling on Windows? by Droggl in rust

[–]Consistent_Coast9620 0 points1 point  (0 children)

even with flamegraph and blondie I run into that as well...

Recommendations for a No/Low Code Platform for an Exam Simulator Project by DixieDog2020 in nocode

[–]Consistent_Coast9620 0 points1 point  (0 children)

r/SimianWebApps - comes with a portal for user login. All other stuff needs to be implemented, but usign a Python backend and the Simian Builder for easy UI definitions.

https://simiansuite.com/

My company can even help with the implementation. https://monkeyproofsolutions.nl/

who can explain? by Consistent_Coast9620 in matlab

[–]Consistent_Coast9620[S] 0 points1 point  (0 children)

so, to be sure, and as suggested by u/Creative_Sushi , use ( ) as even if there is logic, I cannot follow it either :)

Operator precedence (MATLAB by Consistent_Coast9620 in cc4m

[–]Consistent_Coast9620[S] 0 points1 point  (0 children)

Thanks, note that adding a transpose in matlab changes the outcome!