Explore chapters and articles related to this topic
Fundamentals of MATLAB Programming and Scientific Visualization
Published in Dingyü Xue, YangQuan Chen, Scientific Computing with MATLAB®, 2018
The pcode command provided in MATLAB can be used to do the conversion, and the sufix of the converted files is .p. If one wants to convert a MATLAB function mytest.m to P code, the command to use is ; if one wants the generated P code located in the same folder of the M code, the command can be used; if one wants to convert the .m files in a whole folder into P code, he can enter the folder with cd command, then, type the command . If there is no error in the source code, all the files can be converted, otherwise, the conversion will be aborted, and error messages will be displayed. The programmer can also use this method to check whether his source code has syntax errors or not. If both .m and .p exist in the same folder, the .p file has more advantage in execution.
Matrices for Engineers
Published in Abul Hasan Siddiqi, Mohamed Al-Lawati, Messaoud Boulbrachene, Modern Engineering Mathematics, 2017
Abul Hasan Siddiqi, Mohamed Al-Lawati, Messaoud Boulbrachene
MATLAB has many advantages as compared with conventional computer languages or programmes for solving technical problems which can be summarized as follows: Easy to Use: MATLAB is an interpreted language that is very easy to use. It has built-in functions that are optimized for specific problems and thus makes it easy to evaluate certain mathematical expressions using the values in their functions. Complex mathematical problems can be solved easily with a few lines of MATLAB code while other languages may require several hundred lines of code.Platform Independence: The MATLAB software is supported by various operating systems such as Win XP/Vista, UNIX and MAC OS X. The program written in one platform will run on other platforms.Powerful Graphics: This is the one of the important features of MATLAB for technical data analysis and interpretation. MATLAB supports a wide variety of data so that it can be interpreted well. It supports colored 2D and 3D plots and animation videos that make it unique.Graphical User Interface: MATLAB includes tools that allow a programmer to develop a graphical user interface (GUI) for this program. A programmer can design sophisticated data analysis programs that can be operated by inexperienced users.MATLAB Help: The help system is powerful and user friendly. It provides effective help that addresses most topics and commands. Users can obtain help offline and online through the Internet. MATLAB provides hundreds of example demonstrations for solving various problems users may encounter when writing programs.MATLAB Compiler: Flexibility and platform independence are achieved by compiling MATLAB programs into a device-independent p code and p instructions for use at run time. However, these steps cause slow execution of programs and a MATLAB compiler is available to compile program executable (exe) files that run faster.
Thrust-versus-endurance trade-off optimization in swimming
Published in Engineering Optimization, 2020
Christopher W. G. Phillips, Dominic A. Hudson, Stephen R. Turnock, Alexander I. J. Forrester
In recognition that many readers will not have access to the AnyBody® software, a MATLAB® p-code function maxmuscleactivity() that returns an approximation to the AnyBody® results is provided in Phillips et al. (2019). This function is in fact a Kriging model built from a database of results. The model has been validated with a bootstrapped 10-fold cross validation. This draws with replacement 1/10th of the data from those used to build the model, rebuilds the model with these data removed, back-predicts the removed data and calculates the value between the true data and model data. This process is repeated 1000 times and yields a mean and standard deviation , indicating the model is reliably accurate at predicting AnyBody® maximum muscle activity.