Answered
How to get an ouput of a function in a try block ?
Open the window first, and pass it as an argument to MyFunction.

14 years ago | 0

Answered
Normxcorr2 and xcorr2
The functions are not the same: normxcorr2 normalises (i.e. divides by the product of the local standard deviations) but xcorr2 ...

14 years ago | 1

Answered
regexp match - not reading the hole name
Try using \<parameter1\> in the regular expression, instead of parameter1. For example: fileword = 'parameter1'; para...

14 years ago | 0

Answered
Dilate a line and color both sides
Building on Image Analyst's answer, here's another thought about how to trim the ends of the worm. The basic idea is to erode...

14 years ago | 0

Answered
A Quickie: do I have to create a temp array in my code
It looks as if TxTRIn{ii,2}(indx,2:5) is 2D. If that's correct, you can write abMax = max(max(TxTRIn{ii,2}(indx,2:5))); ...

14 years ago | 0

| accepted

Answered
Logical Array Memory Allocation
There's a trade-off between speed and memory use. Accessing and updating individual bits is slow, due to the underlying hardware...

14 years ago | 3

| accepted

Answered
Simple, infinite Animation (or pause on keypress)
Here's a function that may be some use - but others may have neater or more flexible solutions. It doesn't plot the orbit, just ...

14 years ago | 1

Answered
Why is my linear search algorithm not producing the output?
In MATLAB, assignment is = not := as in, for example, Pascal. Also, "not equals" is ~=, and structures such as while lo...

14 years ago | 0

| accepted

Answered
Image Processing, How can I separate this bird from background?
Here is a description of the way I did it - but note that there are many different possibilities. If you try to do it this way a...

14 years ago | 4

| accepted

Answered
Vector Difference
y = [x(1) diff(x)]

14 years ago | 0

| accepted

Answered
Passing string as function argument
It's a bad idea to store your data in 1700 different variables: you'll find it is inefficient, and you already see how awkward i...

14 years ago | 3

| accepted

Answered
Matrix Help
As Jan comments, your question is not clear. Like him, I can't understand the role of the symbols a, b etc. which just seem to ...

14 years ago | 0

Answered
How to display a 3D image
A lot depends on the characteristics of your binary images, and what you want the result to look like. Here's something simple t...

14 years ago | 2

| accepted

Answered
higher order statistical parameters of image
Fifth moment, sixth moment, seventh moment ...

14 years ago | 0

| accepted

Answered
While loop doesn't stop
The stopping test boils down to if sigman >= 0 This only counts as true if *all* elements of the matrix sigman are great...

14 years ago | 0

| accepted

Answered
append .txt file
To combine DateTime and data, they both need to be cell arrays, because one of them contains strings. This will work to produce ...

14 years ago | 0

| accepted

Answered
Multiplying multiple variables within an equation
y = (u.').^2 * sin(theta).^2/(9.81*2); gives you 21 x 91 matrix, where each row corresponds to one of the u values, and eac...

14 years ago | 0

| accepted

Answered
How to calculate arithmetic series?
Does your first example look like this: n SUM i i=1 and your second example look like this: n ...

14 years ago | 0

| accepted

Answered
Wrong mean calculation
It's a rounding error. See <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F this F...

14 years ago | 0

Answered
Array of struct manipulating
It depends whether your data is a structure of arrays or an array of structures. See <http://blogs.mathworks.com/pick/2008/04/22...

14 years ago | 0

Answered
mirror image with frequency domain
Essentially you just flip left to right, using for example fliplr, as you would in the space domain, except that you need to mov...

14 years ago | 0

Answered
stepwise error
The specification for stepwise is stepwise(X,y,inmodel,penter,premove) so you don't need the strings 'penter' and 'premove'....

14 years ago | 0

| accepted

Answered
matrix indexing
It is because the vector F is not logical and contains an element that is not a real positive integer. Note that in MATLAB in...

14 years ago | 1

| accepted

Answered
Finite Element post-processing
You can read the data from the file into a matrix with either *dlmread* or *textscan*. The documentation for these has examples ...

14 years ago | 0

Answered
image block indices
It doesn't make sense to use ra{i}{j} as an index into rc{i}{j}. You can avoid the error message by swapping their roles, r...

14 years ago | 0

Answered
Sum of Euclidean distances
diffs = bsxfun(@minus, xyz(2:end,:), xyz(1,:)); distance = sum(sqrt(sum(diffs.^2, 2)))

14 years ago | 0

| accepted

Answered
Need programming help
Instead of wo = disp('skate'); you need wo = 'skate'; You're mixing up the process of printing something in a wi...

14 years ago | 2

Answered
Multi dimensional data classification
It really depends on what criterion you want to use to determine whether two items of data should be in the same group, so there...

14 years ago | 0

| accepted

Answered
Matrix Multiplication Help
bsxfun(@times, A, B.')

14 years ago | 0

Answered
Image/Shape Registration
The usual way this problem is approached is to match up the points, typically by choosing matches that minimise some measure of ...

14 years ago | 0

Load more