Answered
Setting up an array which has a 4x1 matrix in each one of it's cells
X = repmat({zeros(4,1)},10,10)

13 years ago | 1

Answered
How can I create MAT file?
help imread help save

13 years ago | 1

| accepted

Answered
Replacing string variables that satisfy some criteria by other string variables
looping over strrep would do, I presume: A = {...} Anew = {...} for k = 1: ..., Matrix(:,3) = strrep(Mat...

13 years ago | 0

Answered
Converting 1*4 array into 1*1
Avoid the overhead of converting numbers into strings and back ... Use simple school math and a matrix multiplication: a = ...

13 years ago | 0

Answered
replacing string variables with others
Short and simple: STRREP a = {'A','b','A','t'} ; strrep(a,'A','xxx') % ans = 'xxx' 'b' 'xxx' 't'

13 years ago | 0

Answered
How can I select randomly?
Random can be defined in two ways: % A is your original matrix Nrows = size(A,1) ; % number of rows % Option 1: r...

13 years ago | 1

| accepted

Answered
Split array values into 2 elements
help rem help floor A = [126126, 138154,137146] B = [floor(A/1000) ; rem(A,1000)] B = B(:).' % for cosmetic pur...

13 years ago | 1

| accepted

Answered
How can I compare two logical vectors to a value?
or via De Morgan (http://en.wikipedia.org/wiki/De_Morgan%27s_laws) logi = ~(logix | logiy)

13 years ago | 0

Answered
how to add constant noise in image in matlab function?
See http://www.mathworks.com/matlabcentral/answers/55532-how-to-add-constant-noise-in-image

13 years ago | 0

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

13 years ago

Answered
Asking about Susan filter
Have you tried Google ("SUSAN edge detection") ? It will help you finding a lot of information about SUSAN (all capitals as it i...

13 years ago | 0

Answered
truncating a long for loop
Similar to this? N = Inf ; for k=1:N, if k > 10, break ; end end which will get you a warning: Warning: FOR...

13 years ago | 0

Answered
How to extend the matrix size by splitting up a column in two columns
A = [1 1 1800 1 ; 2 2 1815 2 ; 3 3 6512 3] C = A(:,3) c2 = rem(C,100) c1 = (C - c2)/100 output = [A(:,[1 2]) c...

13 years ago | 1

Answered
make column in a matrix: 1,1,1,2,2,2,3,3,3 etc
A(:,2) = ceil((1:size(A,1))/3)

13 years ago | 2

| accepted

Answered
Error message in matlab
Most likely there is a space in your name ...

13 years ago | 0

Answered
Determine the the slope and its uncertainty?
Do you also want to fit an offset? Polyfit does that for you, but you have to tell regress explicitly,. Example: x = 1:10 ;...

13 years ago | 0

| accepted

Solved


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

13 years ago

Answered
How can I generate the matrix [1 1; 1 2; 1 3 ; 2 1; 2 2; 2 3; 3 1 ; 3 2 ; 3 3] without loops?
COMBN! combn(1:3,2) ans = 1 1 1 2 1 3 2 1 2 2 ...

13 years ago | 0

Submitted


FACTORIALRATIO
Ratio of factorials, as in (a!b!c!...) / (d!e!f!g!...) (version 2.0, oct 2012)

13 years ago | 2 downloads |

5.0 / 5

Submitted


NEXTPERMPOS
the next combination of values in specific positions (extension of PERMPOS)

13 years ago | 2 downloads |

0.0 / 5

Answered
split a vecor into several parts (of different sizes) to later fill a matrix.
Take a look at MAT2CELL and PADCAT % data V = 1:15 ; sz = [3 5 6 1] ; % lengths % engine C = mat2cell(V(:),sz,1...

13 years ago | 0

Submitted


KTHVALUE (v2.1, jun 2012)
select the k-th smallest element in a (randomized) list

14 years ago | 1 download |

5.0 / 5

Solved


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

14 years ago

Submitted


TRIPLESTEST
a non-parametric test for asymmetry

14 years ago | 2 downloads |

5.0 / 5
Thumbnail

Solved


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

14 years ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

14 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

14 years ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

14 years ago

Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

14 years ago

Solved


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

14 years ago

Load more