Resuelto


surface of a spherical planet
you just discovered its circumference, that is the input.

alrededor de 14 años hace

Resuelto


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

alrededor de 14 años hace

Resuelto


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

alrededor de 14 años hace

Resuelto


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

alrededor de 14 años hace

Resuelto


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

alrededor de 14 años hace

Resuelto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

alrededor de 14 años hace

Respondida
matlab coding
OK, the question becomes more concrete now. Since you have A0 and A1, then you can do A = [A0 A1]; B = [A0*A0' A1*A1']; ...

alrededor de 14 años hace | 0

| aceptada

Respondida
Plot of 3D Matrix
You can |mesh| or |surf| doc mesh doc surf

alrededor de 14 años hace | 0

Respondida
Numerically solve for x in a polynomial equation
Write the polynomial as a*x^3+b*x^2+c*x+d-y Then you can use |fzero| to solve x. doc fzero

alrededor de 14 años hace | 1

| aceptada

Respondida
How do i intergrate a signal (sinewave)?
|int| is the symbolic toolbox integration. There are many numerical integration methods in MATLAB, just pick one of them. d...

alrededor de 14 años hace | 0

Respondida
frequency ulation
You can do an FFT to the output of the mixer to find the beat frequency. You can then convert beat frequency to the range using ...

alrededor de 14 años hace | 0

| aceptada

Respondida
Change Pixel intensity value
Say your image is |x|, x(x<0) = 0;

alrededor de 14 años hace | 0

| aceptada

Respondida
signal processing
You can us |xcorr| to do both auto and cross correlation, e.g., xcorr(x,x) xcorr(x,y) doc xcorr Auto correlation ...

alrededor de 14 años hace | 0

Resuelto


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

alrededor de 14 años hace

Resuelto


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

alrededor de 14 años hace

Resuelto


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.

alrededor de 14 años hace

Resuelto


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

alrededor de 14 años hace

Resuelto


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

alrededor de 14 años hace

Resuelto


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

alrededor de 14 años hace

Respondida
area under curve for just 1 period
There are many integration methods in MATLAB, just pick one of them. doc quad doc quadl doc integral I'll use |qu...

alrededor de 14 años hace | 0

Respondida
Algorithm used in [d,l] = bwdist(I)
You can look at the references listed in Algorithm section of the doc doc bwdist

alrededor de 14 años hace | 0

Respondida
Gaussian Distribution
This is really just plotting an equation, for practical purpose, you can plot from -4*sd to 4*sd. Let's say mu is the mean, ...

alrededor de 14 años hace | 1

| aceptada

Respondida
non zero elements above 70 and below -70 zero
Use logical index x(x>70 | x<-70)=0

alrededor de 14 años hace | 0

Respondida
Histogram Peak
You can use |findpeaks| function in Signal Processing Toolbox doc findpeaks

alrededor de 14 años hace | 0

| aceptada

Resuelto


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

alrededor de 14 años hace

Resuelto


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

alrededor de 14 años hace

Resuelto


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

alrededor de 14 años hace

Respondida
exponential random draws and the seed
What's your version of MATLAB? setGlobalStream is introduced in R2011a, try RandStream.setDefaultStream(s)

más de 14 años hace | 0

Respondida
making a function work
Maybe the path is messed up, what is 'ThePathName'? I'd suggest to put calc_avg on the path, then cd to the directory where the ...

más de 14 años hace | 1

Respondida
Using find command on each term in a vector
Not really a syntax for find, but take advantage of arrayfun a = -10:10; b = 22*rand(1,30)-11; c = arrayfun(@(x) find...

más de 14 años hace | 0

| aceptada

Cargar más