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

plus de 13 ans il y a | 1

Réponse apportée
How can I create MAT file?
help imread help save

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 13 ans il y a | 0

Réponse apportée
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 = ...

plus de 13 ans il y a | 0

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

plus de 13 ans il y a | 0

Réponse apportée
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...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
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)

plus de 13 ans il y a | 0

Réponse apportée
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

plus de 13 ans il y a | 0

A résolu


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...

plus de 13 ans il y a

Réponse apportée
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...

plus de 13 ans il y a | 0

Réponse apportée
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...

plus de 13 ans il y a | 0

Réponse apportée
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...

plus de 13 ans il y a | 1

Réponse apportée
make column in a matrix: 1,1,1,2,2,2,3,3,3 etc
A(:,2) = ceil((1:size(A,1))/3)

plus de 13 ans il y a | 2

| A accepté

Réponse apportée
Error message in matlab
Most likely there is a space in your name ...

plus de 13 ans il y a | 0

Réponse apportée
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 ;...

plus de 13 ans il y a | 0

| A accepté

A résolu


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...

plus de 13 ans il y a

Réponse apportée
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 ...

plus de 13 ans il y a | 0

A soumis


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

plus de 13 ans il y a | 2 téléchargements |

5.0 / 5

A soumis


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

plus de 13 ans il y a | 2 téléchargements |

0.0 / 5

Réponse apportée
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...

presque 14 ans il y a | 0

A soumis


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

presque 14 ans il y a | 1 téléchargement |

5.0 / 5

A résolu


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...

environ 14 ans il y a

A soumis


TRIPLESTEST
a non-parametric test for asymmetry

environ 14 ans il y a | 1 téléchargement |

5.0 / 5
Thumbnail

A résolu


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...

plus de 14 ans il y a

A résolu


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...

plus de 14 ans il y a

A résolu


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...

plus de 14 ans il y a

A résolu


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...

plus de 14 ans il y a

A résolu


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...

plus de 14 ans il y a

A résolu


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...

plus de 14 ans il y a

Charger plus