封装参数
输入是t,输出是第一个和序列
封装函数![](https://img-blog.csdnimg.cn/346756d03b0a470497189b97a9aca32a.png)
data是什么?
[151,1]
[152,1]
data好像是直接跳出来的
画图函数,小技巧,可以提取出来数据
function mpcLKAplot(logsout)
%% Get the data from simulation
steering_angle = logsout.getElement('steering_angle');
lateral_deviation = logsout.getElement('lateral_deviation');
relative_yaw_angle = logsout.getElement('relative_yaw_angle');
%% Plot the results
figure('position',[100 100 960 800])
% lateral deviation
subplot(3,1,1)
plot(lateral_deviation.Values.time,lateral_deviation.Values.Data,'b')
grid on
legend('lateral deviation','location','SouthEast')
title('Lateral deviation')
xlabel('time (sec)')
ylabel('lateral deviation (m)')
% relative yaw angle
subplot(3,1,2)
plot(relative_yaw_angle.Values.time,relative_yaw_angle.Values.Data,'b')
grid on
legend('relative yaw angle','location','SouthEast')
title('Relative yaw angle')
xlabel('time (sec)')
ylabel('relative yaw angle (rad)')
% steering angle
subplot(3,1,3)
plot(steering_angle.Values.time,steering_angle.Values.Data,'b')
grid on
legend('steering angle','location','SouthEast')
title('Steering angle')
xlabel('time (sec)')
ylabel('steering angle (rad)')
2019的亚洲会议
完全一致