Skip to content

Conversation

@akeeste
Copy link
Contributor

@akeeste akeeste commented Apr 5, 2021

This PR solves a bug related to running WEC-Sim in Matlab R2021a.

The bug description and resolution are described fully in issue #546

@akeeste akeeste self-assigned this Apr 5, 2021
@akeeste akeeste added Bug bug in WEC-Sim source, high priority Version MATLAB version issue, aka related to version compatibility labels Apr 5, 2021
@akeeste
Copy link
Contributor Author

akeeste commented Apr 6, 2021

The mask initialization for the hydrodynamic body, non-hydro body, drag body and flex body has been updated. The version check is now:

% split version e.g. '9.10.0.16028 (R2021a)' into 9, 10, 0, NaN.
% cannot compare str2double('9.10') because it becomes '9.1' 
ver=split(version,'.');
ver=str2double(ver(1:3));
if ver(1) < 9 || (ver(1) == 9 && ver(2) < 6)
   set_param(h,'ExtGeomFileType',geomType);
end

It was previously:

ver=version;
ver=str2double(ver(1:3));
if ver<9.7
   set_param(h,'ExtGeomFileType',geomType);
end

@akeeste akeeste changed the base branch from dev to master April 7, 2021 22:03
@kmruehl kmruehl requested a review from jleonqu April 7, 2021 22:35
Copy link
Contributor

@jleonqu jleonqu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this pull request using Matlab r2021a and it works, the issue described in #546 has been solved. Thanks @akeeste !

@kmruehl kmruehl merged commit 66d1536 into WEC-Sim:master Apr 13, 2021
@akeeste akeeste deleted the bugfix_r2021a branch April 20, 2021 17:47
@kmruehl kmruehl added the MATLAB/Simulink MATLAB or Simulink related issues label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug bug in WEC-Sim source, high priority MATLAB/Simulink MATLAB or Simulink related issues Version MATLAB version issue, aka related to version compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants