Simulink simulate trajectories of Dubin's car

9 views (last 30 days)
hello people,
I am trying to simulate the trajectories of a vehicle with the help of Simulink.
As we know, the equations of the vehicle are
xdot=vcos(theta) ydot=vsin(theta) thetadot=w
I put an input for w (a constant source or a step), ie w=2. That means that my object goes straight. Then I integrate w and construct xdot and ydot with the help of math operators. In the end I integrate the xdot and ydot, and store the values of x and y to Workspace with the help of Sink block.
As a result, the output of x at scope is a sin function, and y is a cos function. When I export it in Matlab workspace it shows a double vector. Shouldn't this be a 1D array? When I plot( x,y), I should expect something like a cyclic plot, but something wired is shown, because I have 2 double vectors, x and y. Could you please help what's going wrong with my vectors?

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!