Variable might be set by a nonscalar operator
Show older comments
what is wrong with variable theta_deg,
clc
clear
close all
%% Define varaibles
theta_deg=10:1:80; %% theta in 1 degrees increments
theta_rad=deg2rad(theta_deg);
theta_decline= 40.65;
thata_incline=18.05;
M=1; % mass, kg
g=9.81; %acceleration
m_M=0.5;
Mu_s=0.2;
Mu_k=0.15;
%F_f_k=Mu_k*M*g*cos(theta_deg); % dynamic friction force
%F_f_s=Mu_s*M*g*cos(theta_deg); % static friction force
if (10 <theta_deg) && (theta_deg<=18.05)
F_f_k=Mu_k*M*g*cos(theta_deg); % dynamic friction force, box moving upwards
end
if (18.05 <theta_deg)&&(theta_deg<=40.65)
F_f_s=Mu_s*M*g*cos(theta_deg); % static friction force, the box is still
end
if (40.6<theta_deg)&&(theta_deg<=80)
F_f_k=Mu_k*M*g*cos(theta_deg); % dynamic friction force, the box is sliding downwards
end
Accepted Answer
More Answers (1)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!