Home> Common Problem> body text

What does .m mean?

藏色散人
Release: 2019-06-04 15:29:41
Original
44934 people have browsed it

.m is an executable code file format and is the Wolfram Language package source format. Used to store and exchange Wolfram Language programs, program packages and data in pure ASCII text format. Wolfram Language expressions are stored in the form of InputForm, which can represent program code, numerical and text data, two-dimensional raster and vector images, three-dimensional geometry, and sound. and other data types.

What does .m mean?

Usage

In Mathematica, a package is a mathematical text file that contains other than Mathematica applications Definition of commands other than those within the program itself. In fact, Mathematica comes with some Packages; some of them are loaded when Mathematica starts, while others are not loaded at startup. You need to see some packages loaded if they are required by commands defined but are not loaded yet. There are basically two approaches:

Method 1

Open the required package and manually evaluate its commands. (Typically, a package-provided command will be put into a special cell, and depending on your preference settings, Mathematica may evaluate it when the file is opened; in which case all you need to do is open the file , use the "Open..." command in the "File" menu, and display the "OK" dialog box asking about initializing the cells. If there is no such dialog box, you can use the "Evaluate" command of the "Evaluate Initialization" command. "Kernel" menu in the submenu.)

Method 2

Use the Get command. This can be automated to varying degrees. More details below.

Basic usage of the Get command

Get[your_package_name.m]
Copy after login

Where your_package_name.m is the name of the file package (usually the package is suffixed with .m, but this is not absolutely necessary).

Enter An alternative to the Get command is to use two less-than signs:

<< your_package_name.m
Copy after login

When you run this command, one of the following two things will happen

1.Mathematica reads the file and evaluates The command

2.Mathematica cannot find the file and returns an error message.

Note: The .m file is also a code file in Matlab and Objective-C source code files.

The above is the detailed content of What does .m mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
m
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!