FreeMat is a free environment for rapid engineering and scientific prototyping and data processing. It is similar to commercial systems such as MATLAB from Mathworks, and IDL from Research Systems, but is Open Source. FreeMat is available under the GPL license. News Updated News - 2013-06-31 - FreeMat 4.2 - 32 bit binary for Windows. FreeMat has a big speed advantage in terms of simple looping thanks to the new JIT compiler, which can run loops and other simple programming as fast if not much faster than even most commercial packages such as MATLAB. Section 1: Root Finding One of the most basic applications of numerical methods is to find the roots of a single equation. Freemat is an intepereted, matrix-oriented development environment for engineering and scientific applications, similar to the commercial package MATLAB. It provides visualization, image manipulation, and plotting as well as parallel programming. FreeMat is an environment for rapid engineering and scientific processing. It is similar to commercial systems such as MATLAB from Mathworks and IDL from Research Systems, but is Open Source.
and it's command isn't the same as MATLAB's. I wrote my own that
seems to work up to three dimensions anyway. Here it is inline:
% CUMTRAPZ - Cumulative trapezoidal numerical integration
%
% Usage
%
% Z = cumtrapz(Y)
% Z = cumtrapz(X,Y)
% Z = cumtrapz(Y,dim)
% Z = cumtrapz(X,Y,dim)
%
% Description
%
% Z = cumtrapz(Y) computes an approximation of the cumulative integral
of Y via
% the trapezoidal method with unit spacing. To compute the integral
with other
% than unit spacing, multiply Z by the spacing increment. Input Y can
be complex.
%
% For vectors, cumtrapz(Y) is a vector containing the cumulative
integral of Y.
%
% For matrices, cumtrapz(Y) is a matrix the same size as Y with the
cumulative
% integral over each column.
%
% For multidimensional arrays, cumtrapz(Y) works across the first
% nonsingleton dimension.
%
% Z = cumtrapz(X,Y) computes the cumulative integral of Y with respect
to X
% using trapezoidal integration. X and Y must be vectors of the same
length,
% or X must be a column vector and Y an array whose first nonsingleton
dimension
% is length(X). cumtrapz operates across this dimension. Inputs X and
Y can be
% complex.
%
% If X is a column vector and Y an array whose first nonsingleton
dimension
% is length(X), cumtrapz(X,Y) operates across this dimension.
%
% Z = cumtrapz(X,Y,dim) or cumtrapz(Y,dim) integrates across the
dimension of
% Y specified by scalar dim. The length of X must be the same as
size(Y,dim).
%
% Licensed under the GPL
% Copyright (C) 2010 Jonathan Weaver <jonw...@netscape.net>
function [A] = cumtrapz(x,y,dim)
% This program is free software; you can redistribute it and/or modify
it under
% the terms of the GNU General Public License as published by the Free
Software
% Foundation; either version 2 of the License, or (at your option) any
later
% version.
%
% This program is distributed in the hope that it will be useful, but
WITHOUT
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS
% FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more
% details.
%
% You should have received a copy of the GNU General Public License
along with
% this program; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
if (nargin 1) %cumtrapz(y)
[y, dim] = shiftdim(x);
x = 1:size(y,1);
elseif(nargin 2) %cumtrapz(x,y) or cumtrapz(y,dim)
if(isscalar(y)) %cumtrapz(y,dim)
dim = y - 1;
y = shiftdim(x, dim);
x = 1:size(y,1);
else %cumtrapz(x,y);
[y, dim] = shiftdim(y);
if(length(x) ~= size(y,1))
error('The length of x must be equal to the length of
the first non-singleton dimension of y');
end
end
elseif(nargin 3) %cumtrapz(x,y,dim)
dim = dim - 1;
y = shiftdim(y,dim);
if(length(x) ~= size(y,1))
error('The length of x must be equal to the size(Y,dim)');
end
else
error('Invalid number of arguments');
end
n = size(y);
m = n(2:end);
a = [zeros([1 m]); (y(1:(n(1)-1),:,:,:,:,:)+y(2:n(1),:,:,:,:,:))/
2.*repmat(diff(x)', [1 m])];
A = shiftdim(cumsum(a),length(n) - dim);
end
On Nov 16, 6:02 am, Timothy Cyders <t.cyd...@gmail.com> wrote:
> If a numerical solution will suit you (indefinite integrals need not apply),
> you might look at the cumtrapz() function. Example: if you want to take the
> integral of y = x^2+4*x from 0 to 10,
>
> x = 0:0.01:10; % better resolution will give you more precise results
> y = x.^2+4*x;
> integral = cumtrapz(x,y) % gives a vector of values for the definite
> integral from x(1) to x(n). The last value integral(length(integral)) is the
> overall definite integral.
>
> TJ
>
> On Tue, Nov 16, 2010 at 2:38 AM, Eugene <gene...@gmail.com> wrote:> > fre...@googlegroups.com<freemat%2Bunsubscribe@googlegroups.com>
> > FreeMat does not support symbolic operations (yet). You need symbolic
> > algebra software, e.g. Maxima (http://maxima.sourceforge.net/).
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > 'freemat' group.
> > To post to this group, send email to fre...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > .
scientific prototyping and technical computing
Download from PortableApps.com
Version 4.2 for Windows, English
46MB download / 148MB installed
Antivirus Scan | Details
FreeMat Portable can run from a cloud folder, external drive, or local folder without installing into Windows. It's even better with the PortableApps.com Platform for easy installs and automatic updates.
Freemat Examples
- Support PortableApps.com's development and hosting
Description
FreeMat is a free environment for rapid engineering and scientific prototyping and data processing. It is similar to commercial systems such as MATLAB from Mathworks, and IDL from Research Systems, but is Open Source.
- N-dimensional array manipulation (by default, N is limited to 6)
- Support for 8,16, 32, and 64 bit integer types (signed and unsigned), 32 and 64 bit floating point types, and 64 and 128 bit complex types.
- Built in arithmetic for manipulation of all supported data types.
- Support for solving linear systems of equations via the divide operators.
- Eigenvalue and singular value decompositions
- Full control structure support (including, for, while, break, continue, etc.)
- 2D plotting and image display
- Heterogeneous array types (called “cell arrays” in MATLAB-speak) fully supported
- Full support for dynamic structure arrays
- Split-radix based FFT support
- Pass-by-reference support (an IDL feature)
- Keyword support (an IDL feature)
- Codeless interface to external C/C++/FORTRAN code
- Native sparse matrix support
- Function pointers (eval and feval are fully supported)
- Classes, operator overloading
- 3D Plotting and visualization via OpenGL
- Handle-based graphics
- 3D volume rendering capability (via VTK)
Support
Free Math Help
For help with this app, please see the following:
- External: Publisher Documentation
- External: Publisher Support
- PortableApps.com: Education Support Forum
Download Details
Freelab
- Publisher: FreeMat Team & PortableApps.com (Bart.S)
- Date Updated: 2013-08-15
- Date Added: 2010-10-15
- System Requirements: Windows XP, Vista, 7, 8, 10
- App License: Open Source (GPL)
- Source: FreeMat, PortableApps.com Launcher, PortableApps.com Installer
- MD5 Hash: d19e4a163bd54e4d6364da9b7a1c2af1
- SHA256 Hash: 60c6d3e9a07c00780c489292caa9c89b3c52334e072c45b9151e888925362416