From help-request at octave dot org Fri Dec 31 12:31:34 2004 Subject: Matlab Script Files From: "Hubert Fitch" To: "Help Octave" Date: Fri, 31 Dec 2004 13:29:33 -0500 This is a multi-part message in MIME format. ------=_NextPart_000_003D_01C4EF3C.C3F5D240 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To Octave Post1=20 Matlab Script Files I am not a good programmer, and only create program scripts to solve = problems. I need only simple variables, but I use a lot of them! = Assignment definition fies with 220 data and formula assignments must = run first, and then I am ready for direct mode calculator use, and = calling other prorgrams to use the established definitions. No need for Matrix math etc. I need a good precision Computer Algebra = System CAS, with 18 digit scientific notation, which can run script = files, and do efficient copy and paste operations, and provide formatted = printout to print files, for later printing. I need to edit (?1995) .m files created using Matlab Student Edition = Version 5 to run in Octave GNU 2.1.42. Assignment statements and assignment formulas work, but formatted print = statements do not. I also need to find a better way to paste formulas = from Document files into Octave for immediate mode calculation, and for = calling other .m files. Could someone show me how to do this programming = in Octave?=20 Alos, I can paste into the Octve Command window, but this requires a = mouse move and 2 mouse clicks per paste operation. I cannot find a way = to paste into the Octave ghostscript viewer window.. Is there another = viewer available? ------------------------------------------------------------ Examples of assignments. class_wavelen =3D 2*pi*class_radius; class_freq =3D light_speed/class_wavelen; class_period =3D 1 / class_freq;=20 class_capac =3D (4*pi*epsilon0*class_radius); w2 =3D class_wavelen f0 =3D class_freq t0 =3D class perio c0 =3D class_capac ------------------------------------------------------------ Examples of formatted print sttements. =20 fprintf('pri0',' mass_electron %18e',mass_electron); fprintf('pri0',' kilograms \n') fprintf('pri0',' space_impedance %18e',space_impedance); fprintf('pri0',' Ohms \n') % unitsx.m =20 fprintf('prifile0','filename=3Dunits.m UNITS/DIMENSIONS/Definitions = \n\n'); fprintf('prifile0','Newton =3D Force = kg*meter/sec^2 \n'); ------------------------------------------------------------ Examples of calling other files. % No Printfile START.m 1-May-1995 hf clc=20 chdir C:\matlab\hf1 spac1 spac1cl spac1cm spac1bo fprintf('\nthis program runs spac1, spac1cl, spac1cm, and spac1bo\n'); fprintf('before assigning short variable names to those defined = earlier.\n\n'); --------------------------------------------------------------- I will be thankful for any help! (I use the CAS to for calculations to develop and check my Condensed = Photon Theory) Hubert Fitch ------=_NextPart_000_003D_01C4EF3C.C3F5D240 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

To Octave Post1

Matlab Script Files


I am not a good programmer, and only create = program=20 scripts to solve problems. I need only
simple = variables, but=20 I use a lot of them! Assignment definition fies with 220 data and = formula=20 assignments must run first, and then I am ready = for direct=20 mode calculator use, and calling other prorgrams = to use the=20 established definitions.

No need for Matrix math etc. I need a good precision = Computer=20 Algebra System CAS, with 18 digit scientific notation, which can run = script=20 files, and do efficient copy and paste operations, and provide formatted = printout to print files, for later printing.

I need to edit (?1995) .m files created using Matlab = Student=20 Edition Version 5 to run in Octave GNU = 2.1.42.

Assignment statements and assignment formulas work, = but=20 formatted print statements do not. I also need to = find a=20 better way to paste formulas from Document files into Octave for = immediate=20 mode calculation, and for calling other .m files. = Could=20 someone show me how to do this programming in = Octave?=20

Alos, I can paste into the Octve Command window, but = this=20 requires a mouse move and 2 mouse clicks per paste = operation. I cannot find a way to paste into the Octave ghostscript = viewer=20 window.. Is there another viewer=20 available?
-----------------------------------------------------------= -
Examples=20 of assignments.

class_wavelen =3D 2*pi*class_radius;
class_freq =3D = light_speed/class_wavelen;
class_period =3D 1 / class_freq; =
class_capac =3D=20 (4*pi*epsilon0*class_radius);
w2 =3D class_wavelen
f0 =3D = class_freq
t0 =3D=20 class perio
c0 =3D=20 class_capac
----------------------------------------------------------= --
Examples=20 of formatted print sttements.
 
fprintf('pri0','=20 mass_electron         =20 %18e',mass_electron);
fprintf('pri0','  kilograms = \n')

fprintf('pri0','=20 space_impedance       =20 %18e',space_impedance);
fprintf('pri0','  Ohms \n')

% unitsx.m  =20
fprintf('prifile0','filename=3Dunits.m  =20 UNITS/DIMENSIONS/Definitions   =20 \n\n');
fprintf('prifile0','Newton =3D=20 Force           &n= bsp;           =20 kg*meter/sec^2=20 \n');
------------------------------------------------------------
= Examples=20 of calling other files.

%  No=20 Printfile         =20 START.m    1-May-1995  hf
clc
chdir=20 C:\matlab\hf1
spac1
spac1cl
spac1cm
spac1bo

fprintf('\nthis program runs spac1, spac1cl, spac1cm, = and=20 spac1bo\n');
fprintf('before assigning short variable names to those = defined=20 earlier.\n\n');
------------------------------------------------------= ---------

I will be thankful for any help!

(I use the CAS to for calculations to develop and = check my=20 Condensed Photon Theory)

Hubert Fitch

 

------=_NextPart_000_003D_01C4EF3C.C3F5D240-- ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------