Skip to content

Matlab command window shows:The index exceeds the number of array elements. #861

@sinclairwan

Description

@sinclairwan

Note: italicized text below is include as an example and should be updated before submission. If you feel any section is not applicable to your request, please replace with 'N/A' rather than delete a section.

Describe the bug
I'm sorry my English level may not be too good and that I'm a wec-Sim newbie. I imitated the example RM3, only built a float of different sizes, and then used aqwa to solve the float's hydrodynamic files lis and ah1, but when using wecsim simulation, matlab reported an error:,
Incorrect use wecSim (line 44)
The index exceeds the number of array elements (1).
and the mechanics explorer can not output the image normally, I don't know how to solve this problem now, please answer it, I will be grateful.

WEC-Sim file(s)
I put all the simulation files in a compressed package and uploaded them to you.

To Reproduce
Steps to reproduce the behavior:
1.I built a new simulink model(maybe it is incorrect)
2.I removed the definition statement about the sheet and removed the Flating (3DOF) Joint in the wecSiminputFile.m
3. input 'wecSim' in command window
4. then the error appears(as it is shown in the picture):
Incorrect use wecSim (Line 44)
Error evaluating 'StopFcn' callback of Frames block (mask) 'RM4/Global Reference Frame'.
Callback string is 'run('stopWecSim')'
Caused by:
Incorrect use wecSim (第 44 行)
The index exceeds the number of array elements (1).

State method of running WEC-Sim (command line, from simulink with input file, from simulink with custom parameters)

Expected behavior
Finally, it should output six response images and an animation of a float moving on the surface of the water in Mechanics Explorer.

Screenshots
微信图片_20220504192616

Workstation Information (this section MUST BE completed):

  • OS: Windows 10
  • [MATLAB/Simulink Release] 2021a
  • [WEC-Sim Release] v4.4

Additional context
because i am a newbie,so please tell me the details about how to deal with these problems,it is a part of my Master's thesis so i am eager to hear from you! thank you very much!
RM4.zip

Metadata

Metadata

Assignees

Labels

SupportQuestions that need answering but do not require code changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions