【问题标题】:MATLAB fplot of symbolic function符号函数的MATLAB fplot
【发布时间】:2018-10-26 18:31:34
【问题描述】:

这里是新手 Matlab 问题。我确定我在这里遗漏了一些东西,但我似乎无法弄清楚为什么我的 fplot 会空空如也,有人能指出我正确的方向吗?我正在尝试绘制 2 个函数的导数。

syms x(t)%creates symbolic function x of t

alpha=atan(8/x);    % alpha relationship to x
beta=acos(sqrt(x^2+64)/40); % Beta relationship to x
phi=(pi-(alpha+beta)); % phi relationship to x
theta=(pi/2-phi); % theta relationship to x
Dtheta=diff(theta,1); % angular velocity of theta
pretty (Dtheta) % Prints angular velocity of theta in a more readable way
Dphi=diff(phi,1); % angular velocity of phi
pretty (Dphi) % Prints angular velocity of phi in a more readable way

fplot(Dtheta)
fplot(Dphi)

对不起,如果这是一个蹩脚的问题!

【问题讨论】:

    标签: matlab


    【解决方案1】:

    将第一行改为:

    syms x
    

    因为你想定义x 的函数而不是x(t) 的函数。

    【讨论】:

    • 哇!谢谢,我认为这可能很简单。我想我已经看这个太久了。这个论坛太棒了!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-19
    • 1970-01-01
    • 2012-08-12
    • 2019-11-29
    相关资源
    最近更新 更多