help-octave
[Top][All Lists]
Advanced

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

Matlab Script Files


From: Hubert Fitch
Subject: Matlab Script Files
Date: Fri, 31 Dec 2004 13:29:33 -0500

To Octave Post1

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?

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

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

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

%  No Printfile          START.m    1-May-1995  hf
clc
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

 


reply via email to

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