mathematica format + commandline
Greetings,
I'm new to both raspberry pi and to mathematica, and I'd be most appreciative for your help regarding basic setups of mathematica under pi.
(1) I would like to use bigger fonts and to set a darker background color. If I click Format --> Font and change the font size there, my next line of input gets bigger, but the output does not and this change does not persist. I also tried Format -> Size but that makes not difference at all. How should I make this change permanent for the rest of the worksheet?
As for background color, I tried Format -> Background Color
but again that makes no difference at all. What is the correct way to make this change?
(2) I would like/need to do certain mathematica calculations from the command line. I tried to follow the instruction in e.g.
http://openmetric.org/til/programming/r ... -terminal/
but raspberry pi says that "math: command not found". What is the correct command?
(3) Re commandline, I did find
https://www.wolfram.com/wolframscript/
but it seems to take quite a few second each and every time I call this. It is possible e.g. to load wolframscript into the ram once and for all at the start of the session and save myself a bit of time? (I need to call this many times from the commandline)
THANKS!
I'm new to both raspberry pi and to mathematica, and I'd be most appreciative for your help regarding basic setups of mathematica under pi.
(1) I would like to use bigger fonts and to set a darker background color. If I click Format --> Font and change the font size there, my next line of input gets bigger, but the output does not and this change does not persist. I also tried Format -> Size but that makes not difference at all. How should I make this change permanent for the rest of the worksheet?
As for background color, I tried Format -> Background Color
- rasp-2.png
- screenshot showing formating options
- rasp-2.png (108 KiB) Viewed 20426 times
(2) I would like/need to do certain mathematica calculations from the command line. I tried to follow the instruction in e.g.
http://openmetric.org/til/programming/r ... -terminal/
but raspberry pi says that "math: command not found". What is the correct command?
(3) Re commandline, I did find
https://www.wolfram.com/wolframscript/
but it seems to take quite a few second each and every time I call this. It is possible e.g. to load wolframscript into the ram once and for all at the start of the session and save myself a bit of time? (I need to call this many times from the commandline)
THANKS!
- datagrammarian
- Posts: 9
- Joined: Tue Sep 29, 2020 12:17 pm
Re: mathematica format + commandline
For (3), try turning your practice inside-out. Instead of invoking Mathematica from the command line, call the shell from Mathematica. That way the kernel is always loaded (I believe) and only bash (or whatever) has to load, which (I believe) would be much faster.
Specifically, you would start Mathematica sans its frontend with "wolfram" and continue as follows, for example:
You can also switch to the bash shell from the kernel terminal window and stay in it interactively for as long as you want:
Specifically, you would start Mathematica sans its frontend with "wolfram" and continue as follows, for example:
Code: Select all
pi@raspberrypi:~ $ wolfram
Mathematica 12.1.1 Kernel for Linux ARM (32-bit)
Copyright 1988-2020 Wolfram Research, Inc.
In[1]:= Run["! echo $PWD > file.txt"]
Out[1]= 256
In[2]:= FilePrint["file.txt"]
/home/pi
In[3]:= Quit[]
pi@raspberrypi:~ $
Code: Select all
pi@raspberrypi:~ $ wolfram
Mathematica 12.1.1 Kernel for Linux ARM (32-bit)
Copyright 1988-2020 Wolfram Research, Inc.
In[1]:= Range[4] * Range[0,3]
Out[1]= {0, 2, 6, 12}
In[2]:= Run["! bash"]
pi@raspberrypi:~ $ echo -e "Now your in the bash shell...\nuntil you exit it."
Now your in the bash shell...
until you exit it.
pi@raspberrypi:~ $ echo "You're still in the shell."
You're still in the shell.
pi@raspberrypi:~ $ echo "Now exit the shell."; exit
Now exit the shell.
exit
Out[2]= 256
In[3]:= Range[4] * Range[2,5]
Out[3]= {2, 6, 12, 20}
In[4]:= Quit[]
pi@raspberrypi:~ $
"Be the bit you wish to set."
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion