Error Using Plot for single variable function
显示 更早的评论
I am trying to plot the function Rv(f) and then theta(f). However, whenever I run it I get "Error using plot
Data must be numeric, datetime, duration or an array convertible to double."
Any help would be appreciated.
syms f
% Physical properties of the bar
V0 = 1;
R = 1000;
L = 470*10^(-6);
C = 120*10^(-12);
Rv(f) = (V0*R)/sqrt(R^(2)+(2*pi*f*L-1/(2*pi*f*C))^(2));
theta(f) = atan(((1/(2*pi*f*C))-2*pi*f*L)/R);
x1 = 0:1000:4000000;
% Calculate the inital distribution (almost)
plot(x1,Rv(f))
xlabel('x');
grid on
grid minor
pause(0.01)
2 个评论
KSSV
2020-4-28
Youcannot use Rv(f) which is a function striaght away in plot. Substitute the values of f using subs and plot.
Preston Glenn
2020-4-28
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Number Theory 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
