답변 있음
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...

거의 14년 전 | 2

답변 있음
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...

거의 14년 전 | 0

답변 있음
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...

거의 14년 전 | 0

| 수락됨

답변 있음
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); ...

거의 14년 전 | 2

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

거의 14년 전 | 0

| 수락됨

답변 있음
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...

거의 14년 전 | 2

문제를 풀었습니다


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

거의 14년 전

답변 있음
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...

거의 14년 전 | 0

답변 있음
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 ...

거의 14년 전 | 0

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

답변 있음
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...

거의 14년 전 | 1

| 수락됨

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

답변 있음
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...

거의 14년 전 | 0

| 수락됨

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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.

거의 14년 전

문제를 풀었습니다


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

거의 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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.

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

더 보기