Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/Matlab/problem to solve incorrrect

problem to solve incorrrect

PuTI / 2025-02-01
problem to solve incorrrect
Matlab News

%% R-RRR
clear all; clc; close all
% Input data
AB=0.325; %(m)
BC=0.938; %(m)
CD=0.675; %(m)
CE=0.6; %(m)
xD=0.8; %(m)
yD=-0.432; %(m)
phi =pi; %(rad)
xA = 0; yA = 0;
rA = [xA yA 0];
rD = [xD yD 0];
xB = AB*cos(phi); yB = AB*sin(phi); rB = [xB yB 0];
% Position of joint C
%
eqnC1 = ‘(xCsol – xB)^2 + (yCsol – yB)^2 = BC^2 ‘;
% Distance formula: CD=constant
eqnC2 = ‘(xCsol – xD)^2 + (yCsol – yD)^2 = CD^2 ‘;
% Simultaneously solve above equations
solC = solve(eqnC1, eqnC2, ‘xCsol, yCsol’);
% Two solutions for xC – vector form
xCpositions = eval(solC.xCsol);
% Two solutions for yC – vector form
yCpositions = eval(solC.yCsol);
% Separate the solutions in scalar form
% first component of the vector xCpositions
xC1 = xCpositions(1);
% second component of the vector xCpositions
xC2 = xCpositions(2);

yC1 = yCpositions(1);
% second component of the vector yCpositions
yC2 = yCpositions(2);
% Select the correct position for C
% for the given input angle
if xC1 > xD
xC = xC1; yC=yC1;
else
xC = xC2; yC=yC2;
end
rC = [xC yC 0]; % Position vector of C
% Position of joint E
% Distance formula: CE=constant
eqnE1='(xEsol-xC)^2+(yEsol-yC)^2=CE^2′;
% Slope formula:
% E, C, and D are on the same straight line
eqnE2='(yD-yC)/(xD-xC)=(yEsol-yC)/(xEsol-xC)’;
solE = solve(eqnE1, eqnE2, ‘xEsol, yEsol’);
xEpositions = eval(solE.xEsol);
yEpositions = eval(solE.yEsol);
xE1 = xEpositions(1); xE2 = xEpositions(2);
yE1 = yEpositions(1); yE2 = yEpositions(2);
if xE1 < xC
xE = xE1; yE=yE1;
else
xE = xE2; yE=yE2;
end
rE = [xE yE 0]; % Position vector of E
% Angles of the links with the horizontal
phi2 = atan((yB-yC)/(xB-xC));
phi3 = atan((yD-yC)/(xD-xC));
fprintf(‘Results nn’)
fprintf(‘rA = [ %g, %g, %g ] (m)n’, rA)
fprintf(‘rD = [ %g, %g, %g ] (m)n’, rD)
fprintf(‘rB = [ %g, %g, %g ] (m)n’, rB)
fprintf(‘rC = [ %g, %g, %g ] (m)n’, rC)
fprintf(‘rE = [ %g, %g, %g ] (m)n’, rE)
fprintf(‘phi2 = %g (degrees) n’, phi2*180/pi)
fprintf(‘phi3 = %g (degrees) n’, phi3*180/pi)

% Graphic of the mechanism
plot([xA,xB],[yA,yB],’k-o’,’LineWidth’,1.5)
hold on % holds the current plot
plot([xB,xC],[yB,yC],’b-o’,’LineWidth’,1.5)
hold on
plot([xD,xE],[yD,yE],’r-o’,’LineWidth’,1.5)
% adds major grid lines to the current axes
grid on,…
xlabel(‘x (m)’), ylabel(‘y (m)’),…
title(‘positions for phi = 45 (deg)’),…
text(xA,yA,’leftarrow A = ground’,…
‘HorizontalAlignment’,’left’),…
text(xB,yB,’ B’),…
text(xC,yC,’leftarrow C = ground’,…
‘HorizontalAlignment’,’left’),…
text(xD,yD,’leftarrow D = ground’,…
‘HorizontalAlignment’,’left’),…
text(xE,yE,’ E’), axis([-2 3 -2 3])%% R-RRR
clear all; clc; close all
% Input data
AB=0.325; %(m)
BC=0.938; %(m)
CD=0.675; %(m)
CE=0.6; %(m)
xD=0.8; %(m)
yD=-0.432; %(m)
phi =pi; %(rad)
xA = 0; yA = 0;
rA = [xA yA 0];
rD = [xD yD 0];
xB = AB*cos(phi); yB = AB*sin(phi); rB = [xB yB 0];
% Position of joint C
%
eqnC1 = ‘(xCsol – xB)^2 + (yCsol – yB)^2 = BC^2 ‘;
% Distance formula: CD=constant
eqnC2 = ‘(xCsol – xD)^2 + (yCsol – yD)^2 = CD^2 ‘;
% Simultaneously solve above equations
solC = solve(eqnC1, eqnC2, ‘xCsol, yCsol’);
% Two solutions for xC – vector form
xCpositions = eval(solC.xCsol);
% Two solutions for yC – vector form
yCpositions = eval(solC.yCsol);
% Separate the solutions in scalar form
% first component of the vector xCpositions
xC1 = xCpositions(1);
% second component of the vector xCpositions
xC2 = xCpositions(2);

yC1 = yCpositions(1);
% second component of the vector yCpositions
yC2 = yCpositions(2);
% Select the correct position for C
% for the given input angle
if xC1 > xD
xC = xC1; yC=yC1;
else
xC = xC2; yC=yC2;
end
rC = [xC yC 0]; % Position vector of C
% Position of joint E
% Distance formula: CE=constant
eqnE1='(xEsol-xC)^2+(yEsol-yC)^2=CE^2′;
% Slope formula:
% E, C, and D are on the same straight line
eqnE2='(yD-yC)/(xD-xC)=(yEsol-yC)/(xEsol-xC)’;
solE = solve(eqnE1, eqnE2, ‘xEsol, yEsol’);
xEpositions = eval(solE.xEsol);
yEpositions = eval(solE.yEsol);
xE1 = xEpositions(1); xE2 = xEpositions(2);
yE1 = yEpositions(1); yE2 = yEpositions(2);
if xE1 < xC
xE = xE1; yE=yE1;
else
xE = xE2; yE=yE2;
end
rE = [xE yE 0]; % Position vector of E
% Angles of the links with the horizontal
phi2 = atan((yB-yC)/(xB-xC));
phi3 = atan((yD-yC)/(xD-xC));
fprintf(‘Results nn’)
fprintf(‘rA = [ %g, %g, %g ] (m)n’, rA)
fprintf(‘rD = [ %g, %g, %g ] (m)n’, rD)
fprintf(‘rB = [ %g, %g, %g ] (m)n’, rB)
fprintf(‘rC = [ %g, %g, %g ] (m)n’, rC)
fprintf(‘rE = [ %g, %g, %g ] (m)n’, rE)
fprintf(‘phi2 = %g (degrees) n’, phi2*180/pi)
fprintf(‘phi3 = %g (degrees) n’, phi3*180/pi)

% Graphic of the mechanism
plot([xA,xB],[yA,yB],’k-o’,’LineWidth’,1.5)
hold on % holds the current plot
plot([xB,xC],[yB,yC],’b-o’,’LineWidth’,1.5)
hold on
plot([xD,xE],[yD,yE],’r-o’,’LineWidth’,1.5)
% adds major grid lines to the current axes
grid on,…
xlabel(‘x (m)’), ylabel(‘y (m)’),…
title(‘positions for phi = 45 (deg)’),…
text(xA,yA,’leftarrow A = ground’,…
‘HorizontalAlignment’,’left’),…
text(xB,yB,’ B’),…
text(xC,yC,’leftarrow C = ground’,…
‘HorizontalAlignment’,’left’),…
text(xD,yD,’leftarrow D = ground’,…
‘HorizontalAlignment’,’left’),…
text(xE,yE,’ E’), axis([-2 3 -2 3]) %% R-RRR
clear all; clc; close all
% Input data
AB=0.325; %(m)
BC=0.938; %(m)
CD=0.675; %(m)
CE=0.6; %(m)
xD=0.8; %(m)
yD=-0.432; %(m)
phi =pi; %(rad)
xA = 0; yA = 0;
rA = [xA yA 0];
rD = [xD yD 0];
xB = AB*cos(phi); yB = AB*sin(phi); rB = [xB yB 0];
% Position of joint C
%
eqnC1 = ‘(xCsol – xB)^2 + (yCsol – yB)^2 = BC^2 ‘;
% Distance formula: CD=constant
eqnC2 = ‘(xCsol – xD)^2 + (yCsol – yD)^2 = CD^2 ‘;
% Simultaneously solve above equations
solC = solve(eqnC1, eqnC2, ‘xCsol, yCsol’);
% Two solutions for xC – vector form
xCpositions = eval(solC.xCsol);
% Two solutions for yC – vector form
yCpositions = eval(solC.yCsol);
% Separate the solutions in scalar form
% first component of the vector xCpositions
xC1 = xCpositions(1);
% second component of the vector xCpositions
xC2 = xCpositions(2);

yC1 = yCpositions(1);
% second component of the vector yCpositions
yC2 = yCpositions(2);
% Select the correct position for C
% for the given input angle
if xC1 > xD
xC = xC1; yC=yC1;
else
xC = xC2; yC=yC2;
end
rC = [xC yC 0]; % Position vector of C
% Position of joint E
% Distance formula: CE=constant
eqnE1='(xEsol-xC)^2+(yEsol-yC)^2=CE^2′;
% Slope formula:
% E, C, and D are on the same straight line
eqnE2='(yD-yC)/(xD-xC)=(yEsol-yC)/(xEsol-xC)’;
solE = solve(eqnE1, eqnE2, ‘xEsol, yEsol’);
xEpositions = eval(solE.xEsol);
yEpositions = eval(solE.yEsol);
xE1 = xEpositions(1); xE2 = xEpositions(2);
yE1 = yEpositions(1); yE2 = yEpositions(2);
if xE1 < xC
xE = xE1; yE=yE1;
else
xE = xE2; yE=yE2;
end
rE = [xE yE 0]; % Position vector of E
% Angles of the links with the horizontal
phi2 = atan((yB-yC)/(xB-xC));
phi3 = atan((yD-yC)/(xD-xC));
fprintf(‘Results nn’)
fprintf(‘rA = [ %g, %g, %g ] (m)n’, rA)
fprintf(‘rD = [ %g, %g, %g ] (m)n’, rD)
fprintf(‘rB = [ %g, %g, %g ] (m)n’, rB)
fprintf(‘rC = [ %g, %g, %g ] (m)n’, rC)
fprintf(‘rE = [ %g, %g, %g ] (m)n’, rE)
fprintf(‘phi2 = %g (degrees) n’, phi2*180/pi)
fprintf(‘phi3 = %g (degrees) n’, phi3*180/pi)

% Graphic of the mechanism
plot([xA,xB],[yA,yB],’k-o’,’LineWidth’,1.5)
hold on % holds the current plot
plot([xB,xC],[yB,yC],’b-o’,’LineWidth’,1.5)
hold on
plot([xD,xE],[yD,yE],’r-o’,’LineWidth’,1.5)
% adds major grid lines to the current axes
grid on,…
xlabel(‘x (m)’), ylabel(‘y (m)’),…
title(‘positions for phi = 45 (deg)’),…
text(xA,yA,’leftarrow A = ground’,…
‘HorizontalAlignment’,’left’),…
text(xB,yB,’ B’),…
text(xC,yC,’leftarrow C = ground’,…
‘HorizontalAlignment’,’left’),…
text(xD,yD,’leftarrow D = ground’,…
‘HorizontalAlignment’,’left’),…
text(xE,yE,’ E’), axis([-2 3 -2 3]) plot MATLAB Answers — New Questions

​

Tags: matlab

Share this!

Related posts

Optimal decimation to Log Simulation Data
2025-05-18

Optimal decimation to Log Simulation Data

I need to use a scope to display the current i and the power P as functions of the voltage V, with the curves obtained for various irradiance levels and temperatures
2025-05-18

I need to use a scope to display the current i and the power P as functions of the voltage V, with the curves obtained for various irradiance levels and temperatures

Break in and break away points on Root Locus
2025-05-18

Break in and break away points on Root Locus

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: helpdesk@telkomuniversity.ac.id
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss