Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Kseniia Kudriavtceva
am 20 Nov. 2020
Kommentiert: Kseniia Kudriavtceva
am 20 Nov. 2020
So I have an equation and I need to plot as a function of theta, but something isn't working
% Given
syms theta;
R = 20;
L = 80;
H = 38;
theta_1a = 104.720;
% Equation for the velocity of the slider
V_Ba = (theta_1a*R*((cos(theta)-sin(theta)*(H-R*cos(theta))/sqrt(L^2-(H-R*cos(theta))^2)));
% Plot V_B for t between 0 and 2*pi
fplot(V_Ba, [0, 2*pi], 'Linewidth',2)
IDK what's wrong(
Thank you in advance
0 Kommentare
Akzeptierte Antwort
Setsuna Yuuki.
am 20 Nov. 2020
Bearbeitet: Setsuna Yuuki.
am 20 Nov. 2020
you should add a parenthesis in V_Ba
% Given
syms theta;
R = 20;
L = 80;
H = 38;
theta_1a = 104.720;
% Equation for the velocity of the slider
V_Ba = (theta_1a*R*((cos(theta)-sin(theta)*(H-R*cos(theta))/sqrt(L^2-(H-R*cos(theta))^2)))); %% add one )
% Plot V_B for t between 0 and 2*pi
fplot(V_Ba, [0, 2*pi], 'Linewidth',2)
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!