已解决


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

12 years 前

已解决


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

12 years 前

已解决


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

12 years 前

已解决


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

12 years 前

已解决


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

12 years 前

已解决


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

12 years 前

已解决


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

12 years 前

已解决


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

12 years 前

已回答
How can i add echo to a signal
For example: to add an echo after 1s (with amplitude=0.1, phase=pi/3.5) and echo after 1.5 seconds (with a=0.5 and phase=1.2*pi)...

12 years 前 | 1

已解决


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

12 years 前

已解决


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

12 years 前

已解决


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

12 years 前

已解决


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

12 years 前

已解决


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

12 years 前

已解决


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

12 years 前

已解决


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

12 years 前

已解决


Subtract two positive numbers
Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b ...

12 years 前

已解决


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

12 years 前

已解决


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

12 years 前

已解决


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

12 years 前

已回答
Getting rid of a black background surrounding an Image
[row col pg] = size(bg); pg = zeros(row,col,'uint8'); gr = 255*ones(row,col,'uint8'); canv = cat(3,pg,gr,pg); image(canv)

12 years 前 | 0

已回答
Compute PSD from fft compared with spectrogram
Spectrogram is time-frequency (3D=time vs freq. vs amplitude) representation of a signal and periodogram/fft is frequency only (...

12 years 前 | 0

已回答
IFFT of Gaussian-filtered real signal is complex - why?
Your Gaussian filter is *NOT* symmetric in frequency domain. Check this out: stem(fftshift(gaussFilter)) it suppose...

12 years 前 | 1

已回答
How can i add echo to a signal
load handel; echo_delay = 0.5; % in seconds echo_delay_s = round(echo_delay*Fs); % delay in samples ...

12 years 前 | 1

已回答
How to get the number of bin and bin edges from chi2gof test
Use this kind [h,p,stats] = chi2gof(...) Then: NumberOfBins = numel(stats.O); And boundaries of i-th bin are: ...

13 years 前 | 0

已回答
How to reconstruct a sound with data in MATLAB?
Try this: fs=8000; soundsc( pressure-mean(pressure), fs) You should know sampling frequency used in data collecting - here...

13 years 前 | 0

已回答
which TI's MCUs are supported by Matlab
<http://www.mathworks.com/products/embedded-coder/ti-adaptor.html>

13 years 前 | 0

已回答
User Defined Function syntax
*Function hints* this is all about. In MATLAB R2008b writing your own hints is not possible - check response #7 on <http://blogs...

13 years 前 | 4

| 已接受

已回答
Phase-plot when using freqz
It is a matter of expressing angle in degrees or radians. Replace: plot(w,angle(H)) with plot(w, 360/(2*pi)*angle(...

13 years 前 | 1

| 已接受

已回答
Referencing the name "MATLAB"
spelling: <http://www.mathworks.com/products/> EDIT (Good point, Andrew!) pronunciation: load mtlb sound(mtlb)

13 years 前 | 1

加载更多