Answered
Mex -setup compiler
I guess you run Matlab on 64-bit platform (The factory LCC is the only available for 32). A free compiler is Microsoft Visual St...

15 years ago | 1

| accepted

Answered
Why is MATLAB rounding this?
a = 2 fprintf('%1.16e', 10^(log10(a) + 0.125)) 2.6670428643266479e+000 What's *your* problem???

15 years ago | 1

Answered
Sparse Martices
You should take a look at SPARSE command, and more specifically SPDIAGS command that can help to populate the diagonals of spars...

15 years ago | 0

Answered
How do I specify the diagonal elements of a matrix?
Take a look at DIAG function help diag

15 years ago | 5

Answered
Error in Spline (interpolation)
The warning message issued possible due to there are abscissa (chopped filed) too close to each other. You could group them then...

15 years ago | 0

Answered
How do I use rectint to find the area of two intersecting rectangles?
There is a set of polygon boolean operators in Mapping Toolbox. I can't find the official doc but the below link you an idea wha...

15 years ago | 0

Answered
uncertainty in polyfit from measurements?
For Gaussian noise, here is a code to show you how to do without stat toolbox. There is a first part that uses brute force metho...

15 years ago | 0

Answered
Row sums by vector indices without for loop?
Yes, to be more specific my mcolon on FEX <http://www.mathworks.com/matlabcentral/fileexchange/29854-multiple-colon> can be u...

15 years ago | 2

Answered
fmincon (how to set square of a parameter in a constraint)
You can't use Ax=b formulation. Your constraint is non-linear constraint so use the non-linear constraint formulation.

15 years ago | 0

Answered
Solving [K]{x}={b} efficiently, when [K] is symmetric!
Short answer no. Long answer: MATLAB does not have a mechanism of storing symmetric matrix (saving by a factor of 2 is pro...

15 years ago | 0

Answered
Lagrange or spline (interp2)
spline is almost always better.

15 years ago | 0

| accepted

Answered
How do I use randperm to produce a completely new sequence (no numbers in same place)?
This tool by Derek O'Connor can return efficiently a derangement: <http://www.mathworks.com/matlabcentral/fileexchange/30101-rp...

15 years ago | 1

Answered
executable file without supporting file?
You need to read the doc concerning deploying an application. First and foremost it requires to install the MCR (Matlab Componen...

15 years ago | 0

Answered
normal distribution range
Please take a look at my FEX submission. <http://www.mathworks.com/matlabcentral/fileexchange/23832-truncated-gaussian> % Ge...

15 years ago | 3

Answered
Ho do I calculate the angle between two 3d triangles?
P1=randn(3,1) P2=randn(3,1) P3=randn(3,1) P4=randn(3,1) E=P1-P2 % edge Q = null(E') v1 = Q'*(P3-P1) v2 ...

15 years ago | 1

| accepted

Answered
How do I use randperm to produce a completely new sequence (no numbers in same place)?
Jan's method only concerns circular permutation, which is limited. In general, any permutation of a set of cardinal _n_ can be ...

15 years ago | 1

Answered
Search for Stationary Points of Constrained Nonlinear Function
A generic tool is to solve stationary points is FMINCON. If we know more about objective function, we might orient you towards m...

15 years ago | 0

Answered
Extracting entries from vector B that are best estimate each entry in vector A
BS = sort(B); C = interp1(BS, BS, A, 'nearest', 'extrap') Bruno

15 years ago | 0

Answered
How do you randomize numbers but not have two consecutive numbers be the same?
Generate 100 pairs, no two consecutive pair has the same frequency OR the same amplitude: % Data f = (1:5)' a = (1:5)' ...

15 years ago | 1

Answered
Uniform distribution of N points within a sphere
% a is inner radius % b is outer radius % is a number of points a = 2; b = 3; n = 1000; s = randn(3,n); r = (...

15 years ago | 0

Answered
Problem saving/loading structure with function handles
In an old related thread below, there is a way to deal with loading/saving function handle: http://www.mathworks.com/matlabcent...

15 years ago | 1

Answered
Generate random points inside a circle
Here is another non-rejection method based on Gaussian RANDN. To goal is to avoid calling sine/cosine. It seems only slightly fa...

15 years ago | 3

Answered
Generate random points inside a circle
Careful, mathematically there is always a tiny probability the rejection method (Matt's proposal) returns number of points less ...

15 years ago | 5

Submitted


ChooseK
All pairs intersecting on k-1 tuples from all possible k-tuples of n objects

15 years ago | 1 download |

0.0 / 5

Submitted


Multiple-Colon
multiple colon-intervals

15 years ago | 1 download |

5.0 / 5

Submitted


Sparse sub access
This package allows to retrieve and assign values of sparse matrix in one shot.

15 years ago | 1 download |

5.0 / 5

Submitted


ISMEMBERF
Floating-point ISMEMBER (i.e., with round-off tolerance)

15 years ago | 1 download |

5.0 / 5

Submitted


mmtimes: matrix chain product
Return matrix chain product P = M1*M2* ... *Mn

16 years ago | 1 download |

4.5 / 5

Submitted


Truncated Gaussian
Generate a pseudo-random vector X drawn from the truncated Gaussian distribution

16 years ago | 1 download |

4.0 / 5

Load more