1
C:\matlabR12\work\curtcalc.m April 9, 2010 Page 1 10:20:29 PM clc clear all disp( 'three plete $ box plete calculator') a=input('the width of the door='); b=input('the length of the door='); s1=ceil(a*2/45); s2=ceil(a*2/60); s3=ceil(a*2/100); l1=(((b+10)/39)*s1); l2=((b+10)/39*s2); l3=((b+10)/39*s3); p1=fix((s1*45/2-(5+a/2))/5); p2=fix((s2*60/2-(5+a/2))/5); p3=fix((s3*100/2-(5+a/2))/5); q1=fix((s1*45-(5+a))/5); q2=fix((s2*60-(5+a))/5); q3=fix((s3*100-(5+a))/5); fprintf('amount of meterial 45=%2.1f\n',l1); fprintf('amount of meterial 60=%2.1f\n',l2); fprintf('amount of meterial 100=%2.1f\n',l3); fprintf('approx_partitions 45=%i\n',s1); fprintf('approx_partitions 60=%i\n',s2); fprintf('approx_partitions 100=%i\n',s3); disp( 'if window _ door with two partition'); fprintf('number of pletes per one partition in 45=%i\n',p1); fprintf('number of pletes per one partition in 60=%i\n',p2); fprintf('number of pletes per one partition in 100=%i\n',p3); disp( 'if windoe _ door with single partition') fprintf('number of pletes per one partition in 45=%i\n',q1); fprintf('number of pletes per one partition in 60=%i\n',q2); fprintf('number of pletes per one partition in 100=%i\n',q3); disp('NOVA/2010') end

Curt Calc

Embed Size (px)

DESCRIPTION

curtain rationalizations

Citation preview

Page 1: Curt Calc

C:\matlabR12\work\curtcalc.m

April 9, 2010

Page 1

10:20:29 PM

clcclear alldisp( 'three plete $ box plete calculator')a=input('the width of the door=');b=input('the length of the door=');s1=ceil(a*2/45);s2=ceil(a*2/60);s3=ceil(a*2/100);l1=(((b+10)/39)*s1);l2=((b+10)/39*s2);l3=((b+10)/39*s3);p1=fix((s1*45/2-(5+a/2))/5);p2=fix((s2*60/2-(5+a/2))/5);p3=fix((s3*100/2-(5+a/2))/5);q1=fix((s1*45-(5+a))/5);q2=fix((s2*60-(5+a))/5);q3=fix((s3*100-(5+a))/5);fprintf('amount of meterial 45=%2.1f\n',l1);fprintf('amount of meterial 60=%2.1f\n',l2);fprintf('amount of meterial 100=%2.1f\n',l3);fprintf('approx_partitions 45=%i\n',s1);fprintf('approx_partitions 60=%i\n',s2);fprintf('approx_partitions 100=%i\n',s3);disp( 'if window _ door with two partition');fprintf('number of pletes per one partition in 45=% i\n',p1);fprintf('number of pletes per one partition in 60=% i\n',p2);fprintf('number of pletes per one partition in 100= %i\n',p3);disp( 'if windoe _ door with single partition ')fprintf('number of pletes per one partition in 45=% i\n',q1);fprintf('number of pletes per one partition in 60=% i\n',q2);fprintf('number of pletes per one partition in 100= %i\n',q3);disp('NOVA/2010')end