Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

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

11 years ago | 1

Solved


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]

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Solved


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

11 years ago

Answered
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)

11 years ago | 0

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

11 years ago | 0

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

11 years ago | 1

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

11 years ago | 1

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

12 years ago | 0

Answered
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 ago | 0

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

13 years ago | 0

Answered
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 ago | 4

| accepted

Answered
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 ago | 1

| accepted

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

13 years ago | 1

Load more