can anyone help me with this pleaseSolution Grashofs Rule i

can anyone help me with this please?

Solution

% Grashof\'s Rule
% input the lengths in this order [input coupler output ground]
clc
clear all
a = input(\'Enter the length of four linkages in an array: \');
b = sort(a);
% b(1) is the sortest bar and b(4) is the longest
for i = 1:4
if b(i) == 0
disp(\'Error: There is a zero length element, please verify the input\');
flag = 1;
end
end

if flag == 1
break;
else
c = b(1) + b(4); % smallest+ largest
d = b(2) + b(3); % Middle two
if c<d
disp(\'The mechanism is Grashofs Mechnism\');
elseif c>d
disp(\'The mechanism is Non-Grashofs Mechnism\');
else
disp(\'The mechanism is Special Grashofs Mechnism\');
end
end

if a(1) == b(1)
disp(\'Input is a crank\');
else
disp(\'Input is a rocker\');
end

can anyone help me with this please?Solution% Grashof\'s Rule % input the lengths in this order [input coupler output ground] clc clear all a = input(\'Enter th

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site