help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How Come My Program Won't Work?


From: Doug Stewart
Subject: Re: How Come My Program Won't Work?
Date: Sat, 12 Mar 2016 07:23:35 -0500



On Sat, Mar 12, 2016 at 4:18 AM, Bear <address@hidden> wrote:
m_p = 0.003; %mass of pellet ( kg )
m_s = 0.050; %mass of spring piston + 1/3 spring mass ( kg )
r_piston = 0.023; %radius of spring piston in air gun ( m )
c = 1.7272; %caliber ( m )
R = 0; %twist rate of rifling ( 1/m )
f_e = 0; %experimentally quantified elastic compression friction force for
pellet-style ( N )
mu = 0.3; %kinetic coeficient of friction between pellet and barrel
materials
I_p = 0.00223741488; %mass moment of inertia of pellet along its
lognitudinal central axis ( kg*m^2 )
g = 9.801; %force of local gravitational feild (use standard earth value for
analysis) ( m/(kg*s^2) )
P_o = 1.013*10^5; %local atmospheric pressure (normally set at see level for
analysis) ( Pa )
V_o = 0.000006554826; %Volume of air in cylinder when the air gun is
"cocked" ( m^3 )
k = 3000; %spring constant ( N/m )
x_s_f = 0.3226; %compression of spring assembly after cocking ( m )
x_s_o = 1; %compression of spring assembly before cocking ( m )
barrel_length = 1; % ( m )

Windows 8.1 64bit, latest version (4.0.0)




I changed your values and put the new values in as default. you can still change then on the input sheet.

dlg_title = 'Input Specific Design Values';
num_lines = 1;
defaultans = {'0.003','0.050','0.023','.017272','0','0','0.3','0.00223741488','9.801','1.013*10^5','0.0006554826','3000','0.3226','.1','1' };
answer = inputdlg(prompt,dlg_title,num_lines,defaultans);


paste this into your default
defaultans = {'0.003','0.050','0.023','.017272','0','0','0.3','0.00223741488','9.801','1.013*10^5','0.0006554826','3000','0.3226','.1','1' };

 

This now runs in 1 second



--
DAS


reply via email to

[Prev in Thread] Current Thread [Next in Thread]