Matlab Runtime Library - Consists of approximately 400 Matlab math functions - Сообщения






CorFlags will help you to use this plugin on 64-bit system. mw prefix means: Matlab Workspace or MathWorks.
Functions list (blue color - implemented):
General Purpose Commands
Operators and Special Functions
Arithmetic Operator Functions: kron(), minus(), mldivide(), mpower(), mrdivide(), mtimes(), plus(), power(), rdivide(), times(), unaryminus().
Relational Operator Functions: mweq(), mwge(), mwgt(), mwle(), mwlt(), mwneq().
Logical Operator Functions: mwall(), mwand(), mwany(), mwnot(), mwor(), mwxor().
Set Operators: intersect(), ismember(), setdiff(), setxor(), union(), unique().
Special Operator Functions: colon(), ctranspose(), end(), horzcat(), transpose(), vertcat().
Logical Functions: mwfind(), finite(), ischar(), isempty(), isfinite(), isieee(), isequal(), isinf(), isletter(), islogical(), isnan(), isreal(), isspace(), isstr(), isstudent(), isunix(), isvms(), logical(), tobool().
Bitwise Functions: mwbitand(), mwbitcmp(), bitget(), bitmax(), mwbitor(), bitset(), bitshift(), mwbitxor().
MATLAB as a Programming Language: feval(), lasterr(), mfilename(), nargchk(), xyzchk().
Message Display: error(), warning().
Elementary Matrices and Matrix Manipulation
Elementary Matrices: mweye(), linspace(), logspace(), meshgrid(), mwones(), mwrand(), mwrandn(), mwzeros().
Basic Array Information: disp(), isempty(), isequal(), islogical(), isnumeric(), length(), logical(), ndims(), mwsize().
Matrix Manipulation: cat(), diag(), fliplr(), flipud(), ipermute(), permute(), repmat(), reshape(), mwrot90(), shiftdim(), mwtril(), mwtriu().
Special Constants: computer, eps, flops, inf, nan, pi, realmax, realmin.
Specialized Matrices: compan(), hadamard(), hankel(), hilb(), invhilb(), magic(), pascal(), rosser(), toeplitz(), vander(), wilkinson().
Elementary Math Functions
Trigonometric Functions: mwacos(), mwacosh(), mwacot(), mwacoth(), mwacsc(), mwacsch(), mwasec(), mwasech(), mwasin(), mwasinh(), mwatan(), mwatan2(), mwatanh(), mwcos(), mwcosh(), mwcot(), mwcoth(), mwcsc(), mwcsch(), mwsec(), mwsech(), mwsin(), mwsinh(), mwtan(), mwtanh().
Exponential Functions: mwexp(), mwlog(), log10(), log2(), mwnextpow2(), pow2(), reallog(), reallog10(), realpow(), realsqrt(), mwsqrt().
Complex Functions: mwabs(), mwangle(), mwconj(), cplxpair(), mwimag(), isreal(), mwreal(), unwrap().
Rounding and Remainder Functions: mwceil(), mwfix(), mwfloor(), mwmod(), mwrem(), mwround(), mwsign().
Specialized Math Functions: mwbeta(), mwbetainc(), mwbetaln(), cross(), ellipj(), ellipke(), erf(), erfc(), erfcx(), erfinv(), mwexpint(), gamma(), gammainc(), gammaln(), legendre(), mwbesseli(), mwbesselj(), mwbesselk(), mwbesselh(), mwbessely().
Number Theoretic Functions: mwfactor(), gcd(), mwisprime(), lcm(), nchoosek(), perms(), mwprimes(), rat(), rats().
Coordinate System Transforms: mwcart2pol(), mwcart2sph(), pol2cart(), sph2cart().
Numerical Linear Algebra: mwdet(), norm(), normest(), null(), orth(), rank(), rcond(), rref(), subspace(), mwtrace().
Linear Equations: mwchol(), cond(), condest(), inv(), lscov(), lu(), nnls(), pinv(), qr().
Eigenvalues and Singular Values: condeig(), eig(), hess(), poly(), polyeig(), qz(), schur(), mwsvd().
Matrix Functions: mwexpm(), funm(), mwlogm(), mwsqrtm().
Factorization Utilities: mwbalance(), cdf2rdf(), planerot(), qrdelete(), qrinsert(), rsf2csf().
Data Analysis and Fourier Transform Functions
Basic Operations: cumprod(), cumsum(), cumtrapz(), max(), mwmean(), mwmedian(), min(), prod(), sort(), sortrows(), mwstd(), mwsum(), trapz().
Finite Differences: del2(), diff(), gradient().
Correlation: mwcorrcoef(), mwcov(), subspace().
Filtering and Convolution: mwconv(), mwconv2(), deconv(), filter(), filter2().
Fourier Transforms:mwfft(), mwfft2(), fftn(), mwfftshift(), mwifftshift(), mwifft(), mwifft2(), ifftn().
Sound and Audio: freqspace(), lin2mu(), mu2lin().
Polynomial and Interpolation Functions
Data Interpolation: griddata(), icubic(), interp1(), interp1q(), interp2(), interpft().
Spline Interpolation: ppval(), spline().
Geometric Analysis: inpolygon(), polyarea(), rectint().
Polynomials: mwconv(), mwdeconv(), mkpp(), poly(), polyder(), polyfit(), polyval(), polyvalm(), residue(), resi2(), mwroots(), unmkpp().
Function Functions and ODE Solvers
Optimization and Root Finding: fmin(), fmins(), foptions(), fzero(), optimget(), optimset().
Numerical Integration (quadrature): dblquad(), mquad(), quad8().
Ordinary Differential Equation Solvers: mwode23(), mwode45(), mwode113(), mwode15s(), mwode23s().
ODE Option Handling: odeget(), odeset().
Character String Functions
General: blanks(), char(), deblank(), double(), str2mat().
String Tests: ischar(), isletter(), isspace().
String Operations: findstr(), lower(), strcat(), strcmp(), strcmpi(), strjust(), strmatch(), strncmp(), strncmpi(), strrep(), strtok(), strvcat(), upper().
Base Number Conversion: base2dec(), bin2dec(), dec2base(), dec2bin(), dec2hex(), hex2dec(), hex2num().
String to Number Conversion: int2str(), mat2str(), num2str(), sprintf(), sscanf(), str2double(), str2num().
File I/O Functions
File Opening and Closing: fclose(), fopen().
File Positioning: feof(), ferror(), frewind(), fseek(), ftell().
Formatted I/O: fgetl(), fgets(), mwfprintf(), mwfscanf().
Binary File I/O: fread(), fwrite().
String Conversion: sprintf(), sscanf().
File Import/Export Functions: load(), save().
Data Types
Data Types: char(), double().
Object Functions: classname(), isa().
Time and Dates
Current Date and Time: clock(), date(), now().
Basic Functions: datenum(), datestr(), datevec().
Examples:
[albumimg]281[/albumimg] [albumimg]1576[/albumimg] [albumimg]1577[/albumimg] [albumimg]1578[/albumimg]
matlab.ode.kinetic1.sm (8 КиБ) скачан 233 раз(а).
matlab.ode.kinetic2.sm (13 КиБ) скачан 171 раз(а).
matlab.ode.kinetic3.sm (12 КиБ) скачан 159 раз(а).
matlab.ode.test1.sm (19 КиБ) скачан 154 раз(а).
matlab.ode.test2.sm (18 КиБ) скачан 152 раз(а).
matlab.ode.Amplitude detector.sm (20 КиБ) скачан 191 раз(а).
matlab.ode.kinetic1.pdf (77 КиБ) скачан 199 раз(а).
matlab.ode.kinetic2.pdf (91 КиБ) скачан 139 раз(а).
matlab.ode.kinetic3.pdf (87 КиБ) скачан 132 раз(а).
matlab.ode.test1.pdf (110 КиБ) скачан 154 раз(а).
matlab.ode.test2.pdf (110 КиБ) скачан 129 раз(а).
matlab.ode.Amplitude detector.pdf (148 КиБ) скачан 168 раз(а).
Matlab C++ Math Library. ODE solvers. Amplitude detector.sm (14 КиБ) скачан 631 раз(а).
ЦитатаAny chance for interactive plots?
Chapter 25. MATLAB C/C++ Graphics Library 2.1 Release Notes
Using this library, in conjunction with the MATLAB Compiler and the MATLAB C/C++ Math Library, you can create stand-alone applications from M-files that use lines, text, meshes, and polygons as well as interactive visual interface components such as menus, push buttons, and dialog boxes.
ЦитатаNote. You must use the MATLAB Compiler to create C or C++ stand-alone graphics applications. Calling MATLAB C/C++ Graphics Library routines directly from a C or C++ source module is not supported.
So, the answer is no.
ЦитатаDoes that imply that any matlab function could be used by SMath?
I added a list of the available functions (MATLAB C++ Math Library. Reference. Version 2.pdf). Most of them, I think, can be used. The library has functions to solve the ODE: ode45, ode23, ode113, ode15s, ode23s.

By the way, I do not have Matlab installed, just followed the instructions and I could see and use the four mentioned function in SMath from the starting post (mw...). Not quite sure how this could be used without Matlab, but never mind - just wanted to try it on

Regards,
Radovan
[EDIT] Did not understand what uni said about ODE: ode45, ode23, ode113, ode15s, ode23s

Wrote
I added a list of the available functions (MATLAB C++ Math Library. Reference. Version 2.pdf). Most of them, I think, can be used. The library has functions to solve the ODE: ode45, ode23, ode113, ode15s, ode23s.
That sounds good. However, I don't know if any of these solvers has advantages over what we already have in various plugins.
How about the function find or fscanf?
Radovan, this Math Library was created precisely in order to use the Matlab without Matlab.
There is one big problem when using functions from the library. The function can have a different number and different type parameters. Furthermore, a different number of the output data. SMath Studio doesn't support such features. I asked Andrew to think about it.
SMath, we at least need the matrix sign function. Uni, could you please add this?
In order to find all elements in M less then a number a, you would write in Matlab:
[MATH]find(MNot really nice and comprehensible (the expression may well be wrong), but no loop required.
WroteFurthermore, a different number of the output data. SMath Studio doesn't support such features. I asked Andrew to think about it.
For the output parameters, an option would be to use embedded assignment, just like in Davide's findroot function. This is very transparant and handy. You would have an optional argument, being a vector of name=key pairs, where name is a variable name and key is an result item key. Your example then would look like
[MATH lang=eng]mwfind(mat(1,2,0,3,2,2),mat(I≡Index1,J≡Index2,V≡Values,3,1))[/MATH]
Of course, there are open questions: What should the return value be? Are there side effects of embedded assignments in nested expressions?
For providing optional input arguments, this would be an option as well. That would look a bit Python-like.
WroteUpdated. mwfind(1) added.
Radovan, this Math Library was created precisely in order to use the Matlab without Matlab.
There is one big problem when using functions from the library. The function can have a different number and different type parameters. Furthermore, a different number of the output data. SMath Studio doesn't support such features. I asked Andrew to think about it.
If I understood well all of this, these mw... functions will be introduced gradually into SMath, as soon as these and similar problems would be solved in SMath. Was I right about it?
Regards,
Radovan

By the way, the second argument does not need to be a matrix. Scalar will do the job as well

Regards,
Radovan
ЦитатаBy the way, the second argument does not need to be a matrix. Scalar will do the job as well
Yes, but it's an undocumented feature. The function takes a matrix as a parameter.
[albumimg]281[/albumimg]
mwode45(5) - (init, x1, x2, intvls, D) solve non-stiff differential equations, medium order method.
mwode23(5) - (init, x1, x2, intvls, D) solve non-stiff differential equations, low order method.
mwode113(5) - (init, x1, x2, intvls, D) solve non-stiff differential equations, variable order method.
mwode15s(5) - (init, x1, x2, intvls, D) solve stiff differential equations and DAEs, variable order method.
mwode23s(5) - (init, x1, x2, intvls, D) solve stiff differential equations, low order method.
[albumimg]282[/albumimg]
Matlab C++ Math Library. ODE solvers. Arenstorf orbit.pdf (99 КиБ) скачан 180 раз(а).
WroteUpdated. mwfprintf(4), mwfscanf(3), mwfscanf(4).
ЦитатаBy the way, the second argument does not need to be a matrix. Scalar will do the job as well
Yes, but it's an undocumented feature. The function takes a matrix as a parameter.
Now it is documented, but perhaps not officially supported ;-) Is there any chance to overload the operators? Do they have internal functions that could be overwritten?
Also, thanks for the file ops. Writing of strings is not supported so far?
I fail to read the datafile even if I remove the first line with the column titles. Would be interesting to see what performance we get.
One remark to function naming: This is of course entirely in the souvereignity of the plugin creator. Still I would make some recommendations, driven by
the objective, to make an SMath document as much math-on-paper like as opposed to program code.
- I'd recommend to shift the information on the function's origin from name prefixes like dn_, al_, mw... towards the dynamic assistant help string, much like it is done for the efi-loaded libraries.
- If a function is first or best in providing some feature (which quite frequently happens in your plugins), then please give it an intuitive generic name, perhaps with capital first character in order to indicate it as plugin-based. Example: dn_LinAlgEigenvalues() could well be Eigenvalues().
- technical information on which function actually is doing the job, might be shifted to the description string.
Surely, this all is a matter of taste and perhaps it is quickest, not to waste time on naming strategies. Either way, I try to keep up with documenting.
I'll remove all of the prefixes, when Andrey will support the functions with the different types of parameters.
In MATLAB all the parameters are of type matrix. Inside the plugin takes place an implicit conversion to a type of matrix if you use a scalar. Therefore, for example, for the function mwabs() the result is a vector (matrix). Special support for scalar parameters makes sense to do only when overloading will be realized.
"C:\Windows\system32\rundll32" sysdm.cpl,EditEnvironmentVariables
in the plugin handbook page.
but I have no idea how that can be made a link target in the hyperlink region (due to the " signs in the link). Davide, any idea?
An alternative would be that the installer tests for the presence of dll and path entry and adds the entry if required.
WroteI would like to point the user to the environment variable editor using the command line
"C:\Windows\system32\rundll32" sysdm.cpl,EditEnvironmentVariables
in the plugin handbook page.
but I have no idea how that can be made a link target in the hyperlink region (due to the " signs in the link). Davide, any idea?
This require to use an overload of the function that I've used inside the hyperlink region; I need to think how to unlock the feature without compromising those already existing....
P.S. I'm not sure that this command works after windows XP
WroteP.S. I'm not sure that this command works after windows XP
I am using Win7 and got the command line from the program manager after clicking through the system control hierarchy. Faster is to locate the dialog via search for "Umg", german for "env".
WroteUpdated. Now the installer is located within the plugin.
There is an user interaction issue. After updating the plugin and re-starting smath,
the installer dialog pops up and offers installation. You are also informed that you do not need installation if you already have the runtime environment installed. In this case it is natural that the user chooses [Cancel]. Then, however, the dialog pops up every time you launch smath.
If you choose [Install] even if you know that nothing needs to be installed, then suddenly the installer gets aware of that and just finishes and no more messages appear on start-up.
-
Новые сообщения
-
Нет новых сообщений