Réponse apportée
efficient way to rename files while preserving first 5 letters and removing the rest
Here is a function that will do what you need. Be very careful, though, as renaming is irreversible and you need to be certain t...

presque 14 ans il y a | 2

Réponse apportée
Threshold value in singular value decomposition
See the comment above about the economical svd function. I note that the documentation for rank() says that it uses as its de...

presque 14 ans il y a | 0

Réponse apportée
loop through files not working correctly.
Your code reads cycle1.xls every time it starts the loop. It needs to read each file in turn - probably like this: sch_cycl...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
how to use indexing in array of objects?
My best so far (but maybe someone has a simpler way): c = arrayfun(@(x) x.value*k, myarray(j), 'UniformOutput', false); ...

presque 14 ans il y a | 2

Réponse apportée
dicom resolution
I don't know a lot about DICOM images, but a possibility is to use dicomread imresize dicomwrite in that order.

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How to get Canny operator Matrix (just filtering , not edge detection)?
Canny uses first derivatives of the Gaussian filter. So you can convolve with fspecial('gauss',...) and then either use the grad...

presque 14 ans il y a | 2

A résolu


Find the Kronecker Tensor Product without using KRON
The Kronecker Tensor Product is the result of multiplying all elements of a matrix with each of the elements of another matrix. ...

environ 14 ans il y a

Réponse apportée
Negentropy?
ne = 0.5*log(2*pi*exp(1)*var(Image(:))) - entropy(Image) - though you might need to worry about the image mean. The formula...

environ 14 ans il y a | 0

Réponse apportée
edge detection
You have to choose these values yourself, either on the basis of a noise model for the image and an objective function you wish ...

environ 14 ans il y a | 0

A résolu


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

environ 14 ans il y a

A résolu


Make a function that returns its own character count
Write a function that returns a 128 element vector with an accurate inventory of the ASCII characters in its own function file. ...

environ 14 ans il y a

A résolu


Is this group simply connected?
Given connectivity information about a graph, your job is to figure out if the graph is fully connected. You are given a list of...

environ 14 ans il y a

A résolu


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

environ 14 ans il y a

A résolu


Smallest distance between a point and a rectangle
Given two points *x* and *y* placed at opposite corners of a rectangle, find the minimal euclidean distance between another poin...

environ 14 ans il y a

Réponse apportée
Gradient function of matlab
The basic operation is to take half the difference between the two values on either side of the point you are considering. For e...

environ 14 ans il y a | 1

| A accepté

A résolu


Biggest Value in the (Neighbor)Hood
For this challenge you get two inputs: a matrix A and an integer value n. Your function should return a Matrix B of the same si...

environ 14 ans il y a

A résolu


N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

environ 14 ans il y a

A résolu


count to vector
Return a matrix of numbers of dimension K by N, where K = prod(v), and N=length(v). The rows count from a vector of ones up to v...

environ 14 ans il y a

A résolu


Chromatic Tuner
Given a frequency, return the number of cents difference between the given frequency and its nearest semitone (in 12-tone equal ...

environ 14 ans il y a

Réponse apportée
How to change values in a 2 dimensional vector at random points
This might use too much memory, but it's worth a try: c = meshgrid(1:m, 1:n); % size(x) is [n m], not [m n] change = bs...

environ 14 ans il y a | 0

| A accepté

A résolu


magic solver
Create a function that returns _true_ and has a cody <http://www.mathworks.com/matlabcentral/cody/problems/256-return-the-size-o...

environ 14 ans il y a

A résolu


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

environ 14 ans il y a

A résolu


Give the Shortest Path Through The Maze
*Description* The purpose of this problem is to give the shortest path through a maze. The maze will be provided in a codifie...

environ 14 ans il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

environ 14 ans il y a

A résolu


Valid Chess Moves
Using <http://en.wikipedia.org/wiki/Algebraic_chess_notation standard Algebraic notation> ('' for a pawn), given previous move a...

environ 14 ans il y a

A résolu


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

environ 14 ans il y a

A résolu


Mechanics 1
I thought I would make a mechanics problem for all those physics lovers out there. Imagine two solid, rigid spheres B1 and B...

environ 14 ans il y a

A résolu


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

environ 14 ans il y a

A résolu


Maintain shape of logical-index mask
When using logical indexing into an array, MATLAB returns a vector output. For example, if A = magic(3); mask = logi...

environ 14 ans il y a

A résolu


Lose control
Remove all characters that are below space in ASCII value.

environ 14 ans il y a

Charger plus