Skip to content

Matlab R2024b some "Analyze Code" fixes#53

Open
thomas-nilsson-irfu wants to merge 1 commit intoPRBEM:mainfrom
thomas-nilsson-irfu:matlab_analyze_code_fixes
Open

Matlab R2024b some "Analyze Code" fixes#53
thomas-nilsson-irfu wants to merge 1 commit intoPRBEM:mainfrom
thomas-nilsson-irfu:matlab_analyze_code_fixes

Conversation

@thomas-nilsson-irfu
Copy link
Contributor

Changes included are the following:

  • "length(X)==1" and "numel(X)==1" changed to "isscalar(X)".
  • Assigned but unused parameters replaced by "~".
  • Silence a warning about unreachable test code (if true, X, else, Y; end).
  • Remove output argument for function which never set this argument ('info' in onera_desp_lib_load.m).

The Matlab's now - is currently being discouraged, as per https://se.mathworks.com/help/matlab/ref/now.html, in favour of Matlab's datetime. This pull request does not apply any such changes as that could break backwards compatibility with older Matlab versions (before R2014b when datetime was introduced).

Feel free to edit this pull request directly, or comment with any potential improvements.

- "length(X)==1" and "numel(X)==1" changed to "isscalar(X)".
- Assigned but unused parameters replaced by "~".
- Silence a warning about unreachable test code (if true, X, else, Y; end).
- Remove output argument for function which never set this argument
  ('info' in onera_desp_lib_load.m).
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.

1 participant