21/11/2016
program16.mFreeOpenSourceCodesCodeForge.com
Source Codes
Point
Help
Upload
Login Sign up | Favorite Language
Home Source Code S.Rao Appendix Matlab source of Examples Mechanical Vibration Book program16.m
program16.m File view
From
S.Rao Appendix Matlab source of Examples Mechanical Vibration Book
DescriptionIts the examplecodes of Mechanical vibration book written by S.Rao. all codes are in matlab program. ...
By mecrob 20141015
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Views99
Downloads2
Points 1
Rate1.0
%============================================================================
%
%Program16.m
%MainprogramforcallingthesubroutineHOBOLT
%
%============================================================================
%Run"Program16"inMATLABcommandwindow.Progrm16.m,hobolt.m,extfun.m
%andxmult.m,simul.mshouldbeinthesamefolder,andsettheMatlabpath
%tothisfolder
%following9linescontainproblemdependentdata
n=2;
nstep=24;
nstep1=25;
delt=0.24216267;
xi=[00];
xdi=[00];
m=[10;02];
c=[00;00];
k=[62;28];
%endofproblemdependentdata
[x,xd,xdd]=hobolt(m,c,k,xi,xdi,n,nstep,delt,nstep1);
fprintf('SolutionbyHoboltmethod\n\n');
fprintf('Givendata:\n\n');
fprintf('n=%2.0fnstp=%2.0fdelt=%8.6e\n\n',n,nstep,delt);
fprintf('Solution:\n\n');
fprintf('steptimex(i,1)xd(i,1)xdd(i,1)x(i,2)xd(i,2)');
fprintf('xdd(i,2)\n\n');
fori=1:nstep1
time(i)=(i1)*delt;
fprintf('%2.0f%5.4f%5.4e%5.4e%5.4e%5.4e%5.4e%5.4e\n',...
i,time(i),x(i,1),xd(i,1),xdd(i,1),x(i,2),xd(i,2),xdd(i,2));
end
subplot(211);
plot(time',x(1:nstep1,1));
gtext('x(1)');
holdon;
plot(time',xd(1:nstep1,1));
gtext('xd(1)');
holdon;
plot(time',xdd(1:nstep1,1));
gtext('xdd(1)');
ylabel('x(1)');
subplot(212);
plot(time',x(1:nstep1,2));
gtext('x(2)');
holdon;
plot(time',xd(1:nstep1,2));
gtext('xd(2)');
holdon;
plot(time',xdd(1:nstep1,2));
gtext('xdd(2)');
ylabel('x(2)');
xlabel('time');
Want complete source code? Download it here
Points: 1
Download
Sponsored links
http://us.codeforge.com/read/241638/program16.m__html
1/2
21/11/2016
program16.mFreeOpenSourceCodesCodeForge.com
Filelist
Tips: You can preview the content of files by clicking file names^_^
Name
Size
Date
Ex10_6.doc
35.50kB
27-06-0223:49
Ex10_6.m
608.00B
27-06-0223:44
Ex10_6_1.m
235.00B
27-06-0223:47
Ex10_7.doc
29.00kB
27-06-0222:48
Ex10_7.m
832.00B
27-06-0222:49
Dfunc11_10.m
Please input your comment Submit
here
Ex11_10.m
1.0
1 point
291.00B
Matlab Example Programs.rar
345.00B
Favorite
Share
25-06-0215:33
25-06-0215:48
Dfunc11_9.m
186.00B
24-06-0216:13
Ex11_9.m
190.00B
24-06-0216:11
Ex12_5.m
977.00B
24-06-0210:57
DFUNC1_A.M
96.00B
25-06-0218:35
DFUNC1_B.M
123.00B
25-06-0218:36
DFUNC1_C.M
101.00B
25-06-0218:36
Ex13_6.m
1.33kB
26-06-0215:45
DFUNC3_A.M
184.00B
10-05-0215:04
dfunc3_a1.m
186.00B
25-06-0218:18
DFUNC3_B.M
200.00B
10-05-0215:04
dfunc3_b1.m
202.00B
25-06-0218:18
Ex13_7.m
603.00B
25-06-0218:30
Dfunc13_8_1.m
212.00B
25-06-0217:57
...
...
Sponsored links
Pleaseinputkeywords
Search
2014 CodeForge Dev Team All rights reserved. Email:[email protected]
Join us | Contact | Advertisement
Elapsed:76.494ms 5.199
http://us.codeforge.com/read/241638/program16.m__html
2/2