
Available under Creative Commons-ShareAlike 4.0 International License.
% This script computes the load carried by the larger piston in a hydraulic system clc % Clear screen disp('This script computes the load carried by the larger piston in a hydraulic system') disp(' ') % Display blank line initialF=150; finalF=200; increment=10; area1=25; area2=100; F1=[initialF:increment:finalF]; % Creating a row vector with F1 values F2=F1*area2/area1; % Calculating F2 values disp(' ') % Display blank line str = [' F1 F2 '];% Displaying table header disp(str); disp([F1' F2']) % Tabulating results in two columns, ' is being used to transpose row to column
The script output is as follows:
This script computes the load carried by the larger piston in a hydraulic system F1 F2 150 600 160 640 170 680 180 720 190 760 200 800
- 瀏覽次數:1367