Matlab Programming Environment Based On Web: Liu Yu
Matlab Programming Environment Based On Web: Liu Yu
Abstract—Matlab is a mathematics software, which is the engineering calculation, financial modeling design, signal
industry leader in numerical calculation, but this software takes processing and communication, and control design[1]. At
up a lot of system memory and is extremely cumbersome to present, Matlab has been widely used in the mathematical
install. As various types of modeling rise and the intensity and modeling competitions in China or the modeling competitions
frequency of discipline penetration are deepened and accelerate of other disciplines. And even in many schools, Matlab
gradually, Matlab has gradually entered more people's field of programming courses have been specially established.
vision. In order to simplify the programming environment and
improve the convenience, a Matlab programming environment Because Matlab of various versions take up a lot of
based on Web is proposed in this paper. Compared with the memory, whether it is downloading or installing, it is a very
traditional Matlab programming environment, the main features time-consuming and laborious thing. Especially on mobile
of the system are that it does not need to deploy any development phones and tablet computer, it is difficult to build a relatively
environment locally, and users can write and run Matlab code comprehensive Matlab programming environment! The Matlab
through the browser of mobile phone, tablet, computer; at the programming environment based on Web is developed and
same time, the system also supports standard input, parameter designed in this project around the basic state of installing the
input, and image output. Through the research and testing of the programming environment locally based on the current limited
system, the programming environment has strong feasibility, requirements. Through the research on the architecture of the
excellent user experience, good concurrency and stability.
system, the realization of the technology and the writing of the
Keywords—Matlab; Web; programming environment; online
key core code, it finally verifies that in this programming
programming environment, it not only can ensure the normal development of
the program, but also show the excellent stability. Compared
with other online programming environments on the Internet,
I. INTRODUCTION the environment also has an image output function!
Firstly, there are many ways to call the sh file by the web. timeout 3 cat $debug_log
Different programming languages have different ways. Taking fi
Python as an example, it may be Popen(), and it may be
system() in PHP. Mainly call system instructions through the elif [ $lines -eq 10 ]
programming language, and then execute specific commands then
[10] [11]
.
errMesg=`sed -n '2p' < $debug_log`
As for the sh file, it is a script file under Linux. In this
system, the main function of the file is to call the system if [ "$errMesg" != "No Figure to print." ]
compiler to compile the Matlab file. When calling, a major then
premise shall be ensured that the system has been installed with
Matlab.Taking Matlab R2013a as an example, PHP as the Web timeout 3 cat $debug_log
programming language, he core code of the script file is as
follows: fi
510
indicates the time interval (in s), and vertical axis represents the
times of complete requests completed during that interval:
The server processes the submitted code and data and sends
feedback to the front-end page: Fig. 5. System Stress Test (Drawing Test).
It can be seen form the system test results that the system
has a good user experience. While not reducing the function of
the original Matlab, ensuring the smooth running of the code
and the image output, it reduces the start-up and shutdown time
of the original compiler's own graphical interface, and can
quickly write code through the browser without configuring the
local Matlab programming environment. At the same time, the
system has a good pressure resistance. In the pressure
resistance process, it can be clearly seen that in the program
without image output, the system performs well in the 100
Fig. 3. System Code Running Test. consecutive requests. The feedback time interval is mainly
from 200ms to 400ms. In the code with drawing (3D drawing),
After testing the function of the system, the advanced the system runs slower, while the return data is complete, the
functions of the system can be determined. Under the premise system has strong stability, there is no situation with no return
of ensuring the security of the source code, the corresponding content or that the returned content is incorrect. This is because
results or the drawing results can be output quickly and the system only establishes contact with the server when the
accurately, and the code highlighting function is supported, so code is running, so the server side can maintain high
that we can analyze and check the composition structure of concurrency and stability!
code. At the same time, the system also has Stdin, parameter
input and other functions. For Matlab learners, the system can
already meet their needs. III. CONCLUSIONS
After continuously sending requests to the server, under the or those who are learning Matlab or who are planning to
premise that the broadband guarantee is smooth, take the start learn Matlab, it is necessary to have a tool that can write and
of sending as the time node and getting the output results as the run code anytime and anywhere. And for those who are not
end, continuously sent 100 times requests to the non-drawing very demanding on Matlab, but occasionally need it, it is very
program, and the abscissa axis of the table indicates the time important to have an online programming environment. As the
interval (in ms), the vertical axis represents the times of Internet gradually develops, many softwares have launched
complete requests completed during that interval: Web page version, or the mobile version. But for Matlab, this
software, similar tools are rare [12]. A Web-based Python3
programming environment is covered and developed in this
paper. On the one hand, it allows the programming beginner to
put more energy into the programming itself, eliminating the
process of local installation and configuration of programming
environment. On the other hand, the system can also be used as
a teaching tool for the online education platform, and provide
the functions of code writing, testing and remote sharing. The
future work will focus on improving and perfecting the system
function, so as to meet a wider range of user needs.
511
[2] Liu Zhikai, Zhang Taihong, Liu Lei, et al. Web-Based Python3 [7] Mei Gang, Lin Ling, Pan Feng. Design of Online Programming
Programming Environment[J]. Computer Systems and Applications, Environment Based on Web[J]. Computer Era, 2015(5): 29-31.
2015, 24 (7): 236-239. [8] Qin Yuelei, Peng Siwei. Design and Implementation of Source Code
[3] He Zhaoqing. ASP Technology Based on Web Network Online Evaluation System[J]. Fujian Computer, 2008, 24(6): 156-156.
Programming[J]. Journal of Shaoyang University: Social Sciences, 2002, [9] Ji Hongbo. Design and Implementation of Online Evaluation System
1(6): 74-77. of Web Source Program Based on jQuery [D]. Jilin University, 2010.
[4] Ma Shihuan, Zhang Jin. Research on Web-Based Programming [10] Ma Shihuan, Zhang Jin. Research on Web-based Programming
Teaching[J]. Curriculum Education Research: New Teacher Teaching, Teaching[J]. Curriculum Education Research: New Teacher Teaching,
2013(9). 2013(9).
[5] Meng Ya, He Minwei. Web-based Database Programming[J]. [11] Cai Chongchao. Design and Implementation of Online Judgment
Computer Science, 2000, 27(7): 50-52. System Based on Web[J]. Software Guide, 2016, 15(3): 107-109.
[6] Wang Teng, Yao Danlin. Design and Development of Online Judge [12] Liu Zhikai. Research on Python Programmin
System[J]. Computer Applications and Software, 2006, 23(12):129-130.
512