Methods for drawing mathematical function images under windows

Source: Internet
Author: User

First, install the relevant software

    1. Install VirtualBox in Windows;
    2. Install Ubuntu Server in VirtualBox;
    3. Installing Cifs-utils:sudo apt-get Install cifs-utils in Ubuntu server;
    4. Installing Octave:sudo apt-get Install octave transfig epstool in Ubuntu server.


Second, create a shared directory between Windows and Ubuntu server

    1. Share a share folder in Windows, network permissions and directories are all set to everyone & Full control;
    2. Create a mapping directory in Ubuntu server: Sudu mkdir/mnt/share;
    3. mount a network drive in Ubuntu server: sudo mount-t cifs//host Ip/share/mnt/share-o username= host user name;
    4. Create a shortcut link in the/home directory in Ubuntu server: Ln-s/mnt/share/~/share/.


Third, drawing

    1. Write Matlab drawing code files in Windows, and put them in a shared folder, such as file test.m;
    2. In the drawing code, the following plot statement prints the image to a file: Print-dpng myfig.png;
    3. Switch to the shared directory in Ubuntu server: CD ~/share;
    4. Running Octave:sudo octave-q test.m in silent mode;
    5. In Windows you can see that there is a myfig.png in the shared directory, which is the function image.

A test routine:

0:p i/:2*pi;y = Tan;p lot (x, y);p rint-dpng xab.png;

Change Console resolution method:
Edit configuration file, execute command: sudo vi/etc/default/grub
grub_gfxmode=1024x768x24
grub_cmdline_linux_default= "Splash xvga=1024x768x24 consoleblank=0"
# Splash: Display the graphics screen when powering on and off
# xvga=1024x768x24: Screen resolution and color depth
# consoleblank=0: Disable screensaver
Execute command after Save: sudo update-grub2

Methods for drawing mathematical function images under windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.