Skip to content

Error with matlab wrapper SaveState function #384

@windseacn

Description

@windseacn

I want to learn how to combine different initialization methods as illustrated in this link.

The following demonstration python script runs well, the file riser.ic could be generated successfully.

import moordyn

# 1st IC generation stage: The stationary solver
system = moordyn.Create("riser_ic1.txt")
point = moordyn.GetPoint(system, 4)
r = moordyn.GetPointPos(point)
v = [0, 0, 0]
moordyn.Init(system, r, v)
moordyn.SaveState(system, "riser.ic")
moordyn.Close(system)

I want to test this function with matlab, but encounter errors

Error using MoorDynM_SaveState
Can't convert the Array to this TypedArray

The following is my matlab script:

system = MoorDynM_Create('riser_ic1.txt');
point = MoorDynM_GetPoint(system, 4);
x=MoorDynM_GetPointPos(point);
xd = [0 0 0];
MoorDynM_Init(system, x, xd);
MoorDynM_SaveState(system,'mooring.ic');
MoorDynM_Close(system);

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions