Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

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

mehr als 13 Jahre vor | 1

Gelöst


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]

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

Gelöst


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

mehr als 13 Jahre vor

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 0

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

mehr als 13 Jahre vor | 1

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

mehr als 13 Jahre vor | 1

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

mehr als 14 Jahre vor | 0

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

fast 15 Jahre vor | 0

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

etwa 15 Jahre vor | 0

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

mehr als 15 Jahre vor | 4

| akzeptiert

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

mehr als 15 Jahre vor | 1

| akzeptiert

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

mehr als 15 Jahre vor | 1

Mehr laden