matlab - 在 Matlab 中绘制力
问题描述
我需要帮助在 matlab 中绘制 Fbr_ideal 与 Fbf_ideal 方程。目前,我收到一个空白图表。
clear all
close all
a=987.2; % Front axle to CG, mm
L=2468; % Wheelbase, mm
b=L-a; % Rear axle to CG, mm
h=517; % Height of CG
w=3698.17;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Index of terms
% Ff= ratio of Fbf to Wf
% Fr= ratio of Fbr to Wr
% ao= the ratio of ax/g
% Kbf,Kbr= respective brake distribution at fron and rear
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Ideal Distribution
ao=0.2:0.1:1;
Fbf_ideal=(ao.*(b/L).*w)/(1-(ao.*(h/L)));
Fbr_ideal=(ao.*(a/L).*w)/(1+(ao.*(h/L)));
plot(Fbf_ideal,Fbr_ideal,"linewidth",2)
hold on
xlabel("Front Brake Force")
ylabel("Rear Brake Force")
title("Brake Proportioning Curve")
grid
解决方案
那是因为Fbf_ideal
andFbr_ideal
是标量,而不是您可能想要的数组。您可能想使用元素明智的划分:
Fbf_ideal=(ao.*(b/L).*w)/(1-(ao.*(h/L)));
% ^ replace with ./
接下来将绘制从轴到数据点的水平线和垂直线。
plot([Fbf_ideal;Fbf_ideal], [zeros(size(Fbf_ideal)); Fbr_ideal], 'k')
plot([zeros(size(Fbf_ideal)); Fbf_ideal], [Fbr_ideal; Fbr_ideal], 'k')
推荐阅读
- github - GitHub 中没有 SSH URL
- python - 尝试访问最后一个索引时出现索引超出范围错误
- python - 在词干提取时保持专有名词和大写单词
- wpf - 如何在绑定表达式中获取 Grid.Column 值
- python - 如何以最低的价格获得异物
- c# - 如何在不直接使用字符串的情况下在属性构造函数中指定属性路径
- ios - 使用 RxSwift 从 UITableViewCell 向 UIViewController 发送回调
- animation - 如何在颤动中制作动画卡片堆栈
- python - 有效地将 numpy 数组传递给 Matlab 函数
- database - 如何在 hive 或 mongodb 中加载非结构化数据格式