Using Sagemath

Total Page:16

File Type:pdf, Size:1020Kb

Using Sagemath SageMath 1: Using SageMath Cheng-Hsin Hsu Na#onal Tsing Hua University Department of Computer Science CS3330 Scienfic Compung 1 What is SageMath • Sage stands for System for Algebra and Geometry Experimenta#on • Starts from a Computer Algebra System (CAS) • Now a full spectrum of math tools, including – Algebra – Combinatorics – Matrix Computaons – Numerical Math – Calculus – Number Theory hp://www.sagemath.org – Visualizaon – Many other topics CS3330 Scienfic Compung 2 How is SageMath Built • Created in 2005 by William Stein at University of Washington • Goal: Offer an affordable math soUware to solve various math problems • Approach – Leverage opensource (GPL-ed) soUware, such as SciPy, Maxima, and GAP – Adopt the popular Python as the programming language • Outcome: A huge set of math tools! CS3330 Scienfic Compung 3 What SageMath Can Do • Solving exact problems • Solving numerical problems • Plot cool figures – Get a sense of more global behavior CS3330 Scienfic Compung 4 Different Ways to Use SageMath • Notebook: Web-based interface • SageMath Online: Cloud-based Web interface • Interac3ve command-line: Python-like shell prompt • Programs: Write and compile Sage programs • Scripts: Invoke Sage libraries from Python CS3330 Scienfic Compung 5 Where Are Notebook and Command-line CS3330 Scienfic Compung 6 SageMath Notebook • Each notebook has several worksheets • Worksheets can be saved, opens, downloaded, shared, and etc. • SageMath Online: hKp://cloud.sagemath.com/ provides similar interface CS3330 Scienfic Compung 7 SageMath Worksheet • Each worksheet contains several (independent, stateless) cells • Each cell is a box where you can type in formulas and evaluate them ß by pressing the evaluate buon or ShiE-Enter • You can always come back and edit your formulas/commands and re-evaluate them CS3330 Scienfic Compung 8 SageMath Commandline • Command-line remembers states CS3330 Scienfic Compung 9 Use SageMath as a Calculator CS3330 Scienfic Compung 10 Square Root func3on SageMath loves exact answers Numerical approximaon CS3330 Scienfic Compung 11 Compared to Matlab • Everything is double precision floang point by default • Through Symbolic toolbox, which is a trimmed down version of Maple: hKp://www.maplesoU.com/products/Maple/ CS3330 Scienfic Compung 12 Special Constants Simplest exact value Decimals automacally lead to numerical approximaon prec: (integer) default = 53: prec is the number of bits used to represent the manssa of a floang-point number. CS3330 Scienfic Compung 13 More on Square Roots List in Python/Sage, a sequence of comma-separated numbers CS3330 Scienfic Compung 14 SageMath is Case Sensi3ve Mostly, with four excep:ons: true, false, i, n CS3330 Scienfic Compung 15 How to Get Help • Notebook: command? • Command-line: help(command) • Also, u3lize the Tab-comple#on CS3330 Scienfic Compung 16 Trigonometry CS3330 Scienfic Compung 17 Simple 2D Plots CS3330 Scienfic Compung 18 More Complicated func3on CS3330 Scienfic Compung 19 Even More Complicated What do they do? CS3330 Scienfic Compung 20 Ranges of Axes What do they do? CS3330 Scienfic Compung 21 Superimposing of Mul3ple Graph CS3330 Scienfic Compung 22 Polished Graph CS3330 Scienfic Compung 23 Last Example on Graphs CS3330 Scienfic Compung 24 Reduced Row Echelon form (RREf) • System of equaons: 3x 4y +5z = 14 3 45 14 − − x + y 8z = 5 A = 11 8 5 − − 2 − − 3 2x + y + z =7 21 1 7 6 7 4 5 • RREf: 1003 A0 = 2 0100 3 x =3,y =0,z =1 0011 6 7 4 5 CS3330 Scienfic Compung 25 Geng RREf in SageMath • Create a matrix ß what are the first two arguments of matrix(.)? • Invoke rref(.) funcon CS3330 Scienfic Compung 26 Prac3ce, a Tricky Ques3on • Try to solve the following equaon system using SageMath 2x 5z + y =6+w − 5+z y =0 − w + 3(x + y)=z 1+2x y = w 3x • Answer: − − 107 12 54 19 w = − ,x= − ,y = ,z = 7 7 7 7 CS3330 Scienfic Compung 27 Ini3alizing Matrices • Two ways to create matrices CS3330 Scienfic Compung 28 Excep3onal RREf x +2y +3z =7 123 7 4x +5y +6z =16 C1=2 45616 3 78924 7x +8y +9z =24 6 7 4 5 • What is the solu3on? CS3330 Scienfic Compung 29 Excep3onal RREf (cont.) x +2y +3z =7 123 7 4x +5y +6z =16 C2=2 45616 3 7x +8y +9z =25 78925 6 7 4 5 • What are the solu3ons? CS3330 Scienfic Compung 30 Define our Own Funcons CS3330 Scienfic Compung 31 Funcon Composion CS3330 Scienfic Compung 32 factorizaon CS3330 Scienfic Compung 33 Expanding a func3on CS3330 Scienfic Compung 34 Use Sage to Solve Problem Symbolically x2 • Solving x 2=0 2 − − – Symbolically, we get We will start from here 1 p5 ± – Numerically, we get 3.23606797749979 and 1.23606797749979 − CS3330 Scienfic Compung 35 Single-Variable formulas Declare variable, noce that x is always a variable without explicit declaraon CS3330 Scienfic Compung 36 Mul3ple-Variable formulas What does it do? Remember how to solve the same problem using RREF? CS3330 Scienfic Compung 37 Non-Linear Equaon Systems List of lists? How to make it easier to read? CS3330 Scienfic Compung 38 Higher Order Equaons BTW, general polynomial of degree 5 or higher have "no closed-form formula" Try this to see what we get CS3330 Scienfic Compung 39 Quan3c Polynomials and Numerical Solver Solve x5 + x4 + x3 x2 + x 1=0 − − Why can’t we find a soluon? CS3330 Scienfic Compung 40 More Numerical Solver Examples Exercise: what are we calculang? CS3330 Scienfic Compung 41 How to Take Derivaves CS3330 Scienfic Compung 42 Higher Order Derivaves CS3330 Scienfic Compung 43 Indefinite Integral 1 x cos(x2)dx = sin(x2) 2 ? Z x 1 dx = log(x2 + 2) x2 +2 2 ? Z Don’t forget the constant! CS3330 Scienfic Compung 44 Definite and Impossible Integrals 3 x cos(x2)dx 2 Z− 2 x dx x2 +2 Z1 y 2 x2 e− p⇡ Z0 We even define a special funcon for this! CS3330 Scienfic Compung 45 Numerical Integraons CS3330 Scienfic Compung 46 Summary • We introduced SageMath, an opensource project based on Python • We go over basics of SageMath, including symbolic and numerical solu3ons, matrices, and simple plots • We will mostly use SageMath for symbolic soluons – SageMath was ini3ally designed for this – Other tasks are done in Matlab/Octave • References: – hKp://www.sagemath.org ß Official Web and resources – hKp://www.gregorybard.com/SAGE.html ß Our textbook CS3330 Scienfic Compung 47 SageMath #1 Homework (S1) 1. (1%) find at least 5 real number solu3ons of x2 in e− sin(16x)=0 [-1, 1] using SageMath – Hint: Plot the curve first! 2. (1%) Run A = random_matrix(ZZ, 3, 4) in SageMath. Map the matrix into an equaon system (say variables are x, y, and z). Write down the equaon system (in Latex, please turn in the .tex and .pdf). Solve the equaon system using SageMath. Present the solu3on in terms of x, y, and z. 3. (1%) Execute the following code in SageMath. Explain why the two prints give different answers? You need to iden3fy the key difference to get the point. x = ceil(random() * 888) print sqrt(x) print N(sqrt(x)) CS3330 Scienfic Compung 48 Preview of Midterm #1 CS3330 Scienfic Compung 49 .
Recommended publications
  • Sagemath and Sagemathcloud
    Viviane Pons Ma^ıtrede conf´erence,Universit´eParis-Sud Orsay [email protected] { @PyViv SageMath and SageMathCloud Introduction SageMath SageMath is a free open source mathematics software I Created in 2005 by William Stein. I http://www.sagemath.org/ I Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 2 / 7 SageMath Source and language I the main language of Sage is python (but there are many other source languages: cython, C, C++, fortran) I the source is distributed under the GPL licence. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 3 / 7 SageMath Sage and libraries One of the original purpose of Sage was to put together the many existent open source mathematics software programs: Atlas, GAP, GMP, Linbox, Maxima, MPFR, PARI/GP, NetworkX, NTL, Numpy/Scipy, Singular, Symmetrica,... Sage is all-inclusive: it installs all those libraries and gives you a common python-based interface to work on them. On top of it is the python / cython Sage library it-self. Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 4 / 7 SageMath Sage and libraries I You can use a library explicitly: sage: n = gap(20062006) sage: type(n) <c l a s s 'sage. interfaces .gap.GapElement'> sage: n.Factors() [ 2, 17, 59, 73, 137 ] I But also, many of Sage computation are done through those libraries without necessarily telling you: sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage : G . g a p () Group( [ (3,4), (1,2,3)(4,5) ] ) Viviane Pons (U-PSud) SageMath and SageMathCloud October 19, 2016 5 / 7 SageMath Development model Development model I Sage is developed by researchers for researchers: the original philosophy is to develop what you need for your research and share it with the community.
    [Show full text]
  • A Fast Dynamic Language for Technical Computing
    Julia A Fast Dynamic Language for Technical Computing Created by: Jeff Bezanson, Stefan Karpinski, Viral B. Shah & Alan Edelman A Fractured Community Technical work gets done in many different languages ‣ C, C++, R, Matlab, Python, Java, Perl, Fortran, ... Different optimal choices for different tasks ‣ statistics ➞ R ‣ linear algebra ➞ Matlab ‣ string processing ➞ Perl ‣ general programming ➞ Python, Java ‣ performance, control ➞ C, C++, Fortran Larger projects commonly use a mixture of 2, 3, 4, ... One Language We are not trying to replace any of these ‣ C, C++, R, Matlab, Python, Java, Perl, Fortran, ... What we are trying to do: ‣ allow developing complete technical projects in a single language without sacrificing productivity or performance This does not mean not using components in other languages! ‣ Julia uses C, C++ and Fortran libraries extensively “Because We Are Greedy.” “We want a language that’s open source, with a liberal license. We want the speed of C with the dynamism of Ruby. We want a language that’s homoiconic, with true macros like Lisp, but with obvious, familiar mathematical notation like Matlab. We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as Matlab, as good at gluing programs together as the shell. Something that is dirt simple to learn, yet keeps the most serious hackers happy.” Collapsing Dichotomies Many of these are just a matter of design and focus ‣ stats vs. linear algebra vs. strings vs.
    [Show full text]
  • Running Sagemath (With Or Without Installation)
    Running SageMath (with or without installation) http://www.sagemath.org/ Éric Gourgoulhon Running SageMath 9 Feb. 2017 1 / 5 Various ways to install/access SageMath 7.5.1 Install on your computer: 2 options: install a compiled binary version for Linux, MacOS X or Windows1 from http://www.sagemath.org/download.html compile from source (Linux, MacOS X): check the prerequisites (see here for Ubuntu) and run git clone git://github.com/sagemath/sage.git cd sage MAKE=’make -j8’ make Run on your computer without installation: Sage Debian Live http://sagedebianlive.metelu.net/ Bootable USB flash drive with SageMath (boosted with octave, scilab), Geogebra, LaTeX, gimp, vlc, LibreOffice,... Open a (free) account on SageMathCloud https://cloud.sagemath.com/ Run in SageMathCell Single cell mode: http://sagecell.sagemath.org/ 1requires VirtualBox; alternatively, a full Windows installer is in pre-release stage at https://github.com/embray/sage-windows/releases Éric Gourgoulhon Running SageMath 9 Feb. 2017 2 / 5 Example 1: installing on Ubuntu 16.04 1 Download the archive sage-7.5.1-Ubuntu_16.04-x86_64.tar.bz2 from one the mirrors listed at http://www.sagemath.org/download-linux.html 2 Run the following commands in a terminal: bunzip2 sage-7.5.1-Ubuntu_16.04-x86_64.tar.bz2 tar xvf sage-7.5.1-Ubuntu_16.04-x86_64.tar cd SageMath ./sage -n jupyter A Jupyter home page should then open in your browser. Click on New and select SageMath 7.5.1 to open a Jupyter notebook with a SageMath kernel. Éric Gourgoulhon Running SageMath 9 Feb. 2017 3 / 5 Example 2: using the SageMathCloud 1 Open a free account on https://cloud.sagemath.com/ 2 Create a new project 3 In the second top menu, click on New to create a new file 4 Select Jupyter Notebook for the file type 5 In the Jupyter menu, click on Kernel, then Change kernel and choose SageMath 7.5 Éric Gourgoulhon Running SageMath 9 Feb.
    [Show full text]
  • Introduction to GNU Octave
    Introduction to GNU Octave Hubert Selhofer, revised by Marcel Oliver updated to current Octave version by Thomas L. Scofield 2008/08/16 line 1 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 8 6 4 2 -8 -6 0 -4 -2 -2 0 -4 2 4 -6 6 8 -8 Contents 1 Basics 2 1.1 What is Octave? ........................... 2 1.2 Help! . 2 1.3 Input conventions . 3 1.4 Variables and standard operations . 3 2 Vector and matrix operations 4 2.1 Vectors . 4 2.2 Matrices . 4 1 2.3 Basic matrix arithmetic . 5 2.4 Element-wise operations . 5 2.5 Indexing and slicing . 6 2.6 Solving linear systems of equations . 7 2.7 Inverses, decompositions, eigenvalues . 7 2.8 Testing for zero elements . 8 3 Control structures 8 3.1 Functions . 8 3.2 Global variables . 9 3.3 Loops . 9 3.4 Branching . 9 3.5 Functions of functions . 10 3.6 Efficiency considerations . 10 3.7 Input and output . 11 4 Graphics 11 4.1 2D graphics . 11 4.2 3D graphics: . 12 4.3 Commands for 2D and 3D graphics . 13 5 Exercises 13 5.1 Linear algebra . 13 5.2 Timing . 14 5.3 Stability functions of BDF-integrators . 14 5.4 3D plot . 15 5.5 Hilbert matrix . 15 5.6 Least square fit of a straight line . 16 5.7 Trapezoidal rule . 16 1 Basics 1.1 What is Octave? Octave is an interactive programming language specifically suited for vectoriz- able numerical calculations.
    [Show full text]
  • Some Effective Methods for Teaching Mathematics Courses in Technological Universities
    International Journal of Education and Information Studies. ISSN 2277-3169 Volume 6, Number 1 (2016), pp. 11-18 © Research India Publications http://www.ripublication.com Some Effective Methods for Teaching Mathematics Courses in Technological Universities Dr. D. S. Sankar Professor, School of Applied Sciences and Mathematics, Universiti Teknologi Brunei, Jalan Tungku Link, BE1410, Brunei Darussalam E-mail: [email protected] Dr. Rama Rao Karri Principal Lecturer, Petroleum and Chemical Engineering Programme Area, Faculty of Engineering, Universiti Teknologi Brunei, Jalan Tungku Link, Gadong BE1410, Brunei Darussalam E-mail: [email protected] Abstract This article discusses some effective and useful methods for teaching various mathematics topics to the students of undergraduate and post-graduate degree programmes in technological universities. These teaching methods not only equip the students to acquire knowledge and skills for solving real world problems efficiently, but also these methods enhance the teacher’s ability to demonstrate the mathematical concepts effectively along with suitable physical examples. The exposure to mathematical softwares like MATLAB, SCILAB, MATHEMATICA, etc not only increases the students confidential level to solve variety of typical problems which they come across in their respective disciplines of study, but also it enables them to visualize the surfaces of the functions of several variable. Peer learning, seminar based learning and project based learning are other methods of learning environment to the students which makes the students to learn mathematics by themselves. These are higher level learning methods which enhances the students understanding on the mathematical concepts and it enables them to take up research projects. It is noted that the teaching and learning of mathematics with the support of mathematical softwares is believed to be more effective when compared to the effects of other methods of teaching and learning of mathematics.
    [Show full text]
  • Gretl User's Guide
    Gretl User’s Guide Gnu Regression, Econometrics and Time-series Allin Cottrell Department of Economics Wake Forest university Riccardo “Jack” Lucchetti Dipartimento di Economia Università Politecnica delle Marche December, 2008 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation (see http://www.gnu.org/licenses/fdl.html). Contents 1 Introduction 1 1.1 Features at a glance ......................................... 1 1.2 Acknowledgements ......................................... 1 1.3 Installing the programs ....................................... 2 I Running the program 4 2 Getting started 5 2.1 Let’s run a regression ........................................ 5 2.2 Estimation output .......................................... 7 2.3 The main window menus ...................................... 8 2.4 Keyboard shortcuts ......................................... 11 2.5 The gretl toolbar ........................................... 11 3 Modes of working 13 3.1 Command scripts ........................................... 13 3.2 Saving script objects ......................................... 15 3.3 The gretl console ........................................... 15 3.4 The Session concept ......................................... 16 4 Data files 19 4.1 Native format ............................................. 19 4.2 Other data file formats ....................................... 19 4.3 Binary databases ..........................................
    [Show full text]
  • Automated Likelihood Based Inference for Stochastic Volatility Models H
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Institutional Knowledge at Singapore Management University Singapore Management University Institutional Knowledge at Singapore Management University Research Collection School Of Economics School of Economics 11-2009 Automated Likelihood Based Inference for Stochastic Volatility Models H. Skaug Jun YU Singapore Management University, [email protected] Follow this and additional works at: https://ink.library.smu.edu.sg/soe_research Part of the Econometrics Commons Citation Skaug, H. and YU, Jun. Automated Likelihood Based Inference for Stochastic Volatility Models. (2009). 1-28. Research Collection School Of Economics. Available at: https://ink.library.smu.edu.sg/soe_research/1151 This Working Paper is brought to you for free and open access by the School of Economics at Institutional Knowledge at Singapore Management University. It has been accepted for inclusion in Research Collection School Of Economics by an authorized administrator of Institutional Knowledge at Singapore Management University. For more information, please email [email protected]. Automated Likelihood Based Inference for Stochastic Volatility Models Hans J. SKAUG , Jun YU November 2009 Paper No. 15-2009 ANY OPINIONS EXPRESSED ARE THOSE OF THE AUTHOR(S) AND NOT NECESSARILY THOSE OF THE SCHOOL OF ECONOMICS, SMU Automated Likelihood Based Inference for Stochastic Volatility Models¤ Hans J. Skaug,y Jun Yuz October 7, 2008 Abstract: In this paper the Laplace approximation is used to perform classical and Bayesian analyses of univariate and multivariate stochastic volatility (SV) models. We show that imple- mentation of the Laplace approximation is greatly simpli¯ed by the use of a numerical technique known as automatic di®erentiation (AD).
    [Show full text]
  • Sage Tutorial (Pdf)
    Sage Tutorial Release 9.4 The Sage Development Team Aug 24, 2021 CONTENTS 1 Introduction 3 1.1 Installation................................................4 1.2 Ways to Use Sage.............................................4 1.3 Longterm Goals for Sage.........................................5 2 A Guided Tour 7 2.1 Assignment, Equality, and Arithmetic..................................7 2.2 Getting Help...............................................9 2.3 Functions, Indentation, and Counting.................................. 10 2.4 Basic Algebra and Calculus....................................... 14 2.5 Plotting.................................................. 20 2.6 Some Common Issues with Functions.................................. 23 2.7 Basic Rings................................................ 26 2.8 Linear Algebra.............................................. 28 2.9 Polynomials............................................... 32 2.10 Parents, Conversion and Coercion.................................... 36 2.11 Finite Groups, Abelian Groups...................................... 42 2.12 Number Theory............................................. 43 2.13 Some More Advanced Mathematics................................... 46 3 The Interactive Shell 55 3.1 Your Sage Session............................................ 55 3.2 Logging Input and Output........................................ 57 3.3 Paste Ignores Prompts.......................................... 58 3.4 Timing Commands............................................ 58 3.5 Other IPython
    [Show full text]
  • How Maple Compares to Mathematica
    How Maple™ Compares to Mathematica® A Cybernet Group Company How Maple™ Compares to Mathematica® Choosing between Maple™ and Mathematica® ? On the surface, they appear to be very similar products. However, in the pages that follow you’ll see numerous technical comparisons that show that Maple is much easier to use, has superior symbolic technology, and gives you better performance. These product differences are very important, but perhaps just as important are the differences between companies. At Maplesoft™, we believe that given great tools, people can do great things. We see it as our job to give you the best tools possible, by maintaining relationships with the research community, hiring talented people, leveraging the best available technology even if we didn’t write it ourselves, and listening to our customers. Here are some key differences to keep in mind: • Maplesoft has a philosophy of openness and community which permeates everything we do. Unlike Mathematica, Maple’s mathematical engine has always been developed by both talented company employees and by experts in research labs around the world. This collaborative approach allows Maplesoft to offer cutting-edge mathematical algorithms solidly integrated into the most natural user interface available. This openness is also apparent in many other ways, such as an eagerness to form partnerships with other organizations, an adherence to international standards, connectivity to other software tools, and the visibility of the vast majority of Maple’s source code. • Maplesoft offers a solution for all your academic needs, including advanced tools for mathematics, engineering modeling, distance learning, and testing and assessment. By contrast, Wolfram Research has nothing to offer for automated testing and assessment, an area of vital importance to academic life.
    [Show full text]
  • 2015 Program for Women and Mathematics
    2015 Program for Women and Mathematics SageMath Installation Instructions Below are instructions for configuring your personal computer to run SageMath. Since one of the files that you need to download is quite large in size, we recommended that you complete the steps below on your personal computer prior to the start of the 2015 Program for Women and Mathematics. If you run into any issues with these instructions on your personal computer, please contact the School of Mathematics Help Desk at [email protected] or visit the SageMath website (http://www.sagemath.org/). Fedora 21 Operating System 1. Download and unpack the Fedora 21 pre-built SageMath binary tarball from the following location: http://www.sagemath.org/download-linux.html. 2. Create a symbolic link in /usr/local/bin that points to the path where you unpacked the pre-built SageMath binary in Step 1. For example, ln -s /path/to/sage-x.y.z-x86_64-Linux/sage /usr/local/bin/sage 3. Navigate to /usr/local/bin. 4. Type sage and press the Enter button. 5. You will be prompted to install “sagemath”. Enter y. Please wait for all required packages to be downloaded and installed. 6. Once the installation is complete, type sage. 7. Type notebook() to launch the browser-based notebook interface. 8. Type in a new password for the SageMath Notebook “admin” account twice. 9. The SageMath browser-based notebook should now be displayed. How to exit the Sage appliance 1. Click on the Sign out link at the top of the SageMath browser based notebook interface.
    [Show full text]
  • Using Octave and Sagemath on Taito
    Using Octave and SageMath on Taito Sampo Sillanpää 17 October 2017 CSC – Finnish research, education, culture and public administration ICT knowledge center Octave ● Powerful mathematics-oriented syntax with built- in plotting and visualization tools. ● Free software, runs on GNU/Linux, macOS, BSD, and Windows. ● Drop-in compatible with many Matlab scripts. ● https://www.gnu.org/software/octave/ SageMath ● SageMath is a free open-source mathematics software system licensed under the GPL. ● Builds on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more. ● http://www.sagemath.org/ Octave on Taito ● Latest version 4.2.1 module load octave-env octave Or octave --no-gui ● Interactive sessions on Taito-shell via NoMachine client https://research.csc.5/-/nomachine Octave Forge ● A central location for development of packages for GNU Octave. ● Packages can be installed on Taito module load octave-env octave --no-gui octave:> pkg install -forge package_name octave:> pkg load package_name SageMath on Taito ● installed version 7.6. module load sagemath sage ● Interactive sessions on Taito-shell via NoMachine client. ● Browser-based notebook sage: notebook() Octave Batch Jobs #!/bin/bash -l #mytest.sh #SBATCH --constraint="snb|hsw" #SBATCH -o output.out #SBATCH -e stderr.err #SBATCH -p serial #SBATCH -n 1 #SBATCH -t 00:05:00 #SBATCH --mem-per-cpu=1000 module load octave-env octave --no-gui/wrk/user_name/example.m used_slurm_resources.bash [user@taito-login1]$ sbatch mytest.sh SageMath Batch Jobs #!/bin/bash -l #mytest.sh #SBATCH --constraint="snb|hsw" #SBATCH -o output.out #SBATCH -e stderr.err #SBATCH -p serial #SBATCH -n 1 #SBATCH -t 00:05:00 #SBATCH --mem-per-cpu=1000 module load sagemath sage /wrk/user_name/example.sage used_slurm_resources.bash [user@taito-login1]$ sbatch mytest.sh Instrucons and Documentaon ● Octave – https://research.csc.5/-/octave – https://www.gnu.org/software/octave/doc/interp reter/ ● SageMath – https://research.csc.5/-/sagemath – http://doc.sagemath.org/ [email protected].
    [Show full text]
  • Using MATLAB
    MATLAB® The Language of Technical Computing Computation Visualization Programming Using MATLAB Version 6 How to Contact The MathWorks: www.mathworks.com Web comp.soft-sys.matlab Newsgroup [email protected] Technical support [email protected] Product enhancement suggestions [email protected] Bug reports [email protected] Documentation error reports [email protected] Order status, license renewals, passcodes [email protected] Sales, pricing, and general information 508-647-7000 Phone 508-647-7001 Fax The MathWorks, Inc. Mail 3 Apple Hill Drive Natick, MA 01760-2098 For contact information about worldwide offices, see the MathWorks Web site. Using MATLAB COPYRIGHT 1984 - 2001 by The MathWorks, Inc. The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or repro- duced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by or for the federal government of the United States. By accepting delivery of the Program, the government hereby agrees that this software qualifies as "commercial" computer software within the meaning of FAR Part 12.212, DFARS Part 227.7202-1, DFARS Part 227.7202-3, DFARS Part 252.227-7013, and DFARS Part 252.227-7014. The terms and conditions of The MathWorks, Inc. Software License Agreement shall pertain to the government’s use and disclosure of the Program and Documentation, and shall supersede any conflicting contractual terms or conditions. If this license fails to meet the government’s minimum needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to MathWorks.
    [Show full text]