home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-08-18 | 999 b | 47 lines | [TEXT/RLAB] |
- rfile section
-
- P = [0,0;0,14;16,14;16,13;1,13;1,2;11,2;11,0;0,0];
- S = section(P);
- show_prop(P,S);
- pause();
-
- //
- // Example 1: Section properties of a rectangle
- //
- A = [0,0;0,4;2,4;2,0;0,0];
- S = section(A);
- show_prop(A,S);
- pause();
- //
- // Example 2: Section properties of a triangle
- //
- P = [0,0;0,1;1,0;0,0];
- S = section(P);
- show_prop(P,S);
- pause();
- //
- // Example 3: Section properties of an unit circle
- //
- theta = (360:0:-5)';
- r = ones(theta.nr,1);
- S = section([r,theta],"polar");
- show_prop([r,theta],S,"polar");
- pause();
- //
- // Example 4: Section properties of a C section
- //
- P = [1,75;ones(42,1),(80:285:5)';1.2,285;ones(42,1)*1.2,(280:75:-5)'];
- S = section(P,"polar");
- show_prop(P,S,"polar");
- pause();
- //
- // Example 5: Section properties of a square with a center hole
- //
- s2 = sqrt(2);
- P = [10,0;10*s2,-45;10*s2,225;10*s2,135;10*s2,45;10,0;...
- 5*ones(73,1),(0:360:5)';10,0];
- S = section(P,"polar");
- show_prop(P,S,"polar");
- pause();
-
-