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

mehr als 14 Jahre vor | 2

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

mehr als 14 Jahre vor | 0

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

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
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); ...

mehr als 14 Jahre vor | 2

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

mehr als 14 Jahre vor | 0

| akzeptiert

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

mehr als 14 Jahre vor | 2

Gelöst


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

mehr als 14 Jahre vor

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

mehr als 14 Jahre vor | 0

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

mehr als 14 Jahre vor | 0

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

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

mehr als 14 Jahre vor | 1

| akzeptiert

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

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

mehr als 14 Jahre vor | 0

| akzeptiert

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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.

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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.

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Gelöst


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

mehr als 14 Jahre vor

Mehr laden