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

quasi 14 anni fa | 1

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

quasi 14 anni fa | 1

| accettato

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

quasi 14 anni fa | 0

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

quasi 14 anni fa | 0

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

quasi 14 anni fa | 0

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

quasi 14 anni fa | 1

| accettato

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

quasi 14 anni fa | 1

| accettato

Risposto
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)

quasi 14 anni fa | 0

Risposto
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

quasi 14 anni fa | 0

Risolto


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

quasi 14 anni fa

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

quasi 14 anni fa | 0

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

quasi 14 anni fa | 0

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

circa 14 anni fa | 1

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

circa 14 anni fa | 2

| accettato

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

circa 14 anni fa | 0

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

circa 14 anni fa | 0

| accettato

Risolto


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

circa 14 anni fa

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

circa 14 anni fa | 0

Inviato


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

circa 14 anni fa | 1903 download |

5.0 / 5

Inviato


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

circa 14 anni fa | 243 download |

0.0 / 5

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

circa 14 anni fa | 0

Inviato


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

oltre 14 anni fa | 2142 download |

5.0 / 5

Risolto


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

oltre 14 anni fa

Inviato


TRIPLESTEST
a non-parametric test for asymmetry

oltre 14 anni fa | 2277 download |

5.0 / 5
Thumbnail

Risolto


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

quasi 15 anni fa

Risolto


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

quasi 15 anni fa

Risolto


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

quasi 15 anni fa

Risolto


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

quasi 15 anni fa

Risolto


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

quasi 15 anni fa

Risolto


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

quasi 15 anni fa

Carica altro