Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

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

quasi 12 anni fa | 1

Risolto


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]

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

Risolto


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

quasi 12 anni fa

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

quasi 12 anni fa | 0

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

quasi 12 anni fa | 0

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

quasi 12 anni fa | 1

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

quasi 12 anni fa | 1

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

quasi 13 anni fa | 0

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 0

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

oltre 13 anni fa | 4

| accettato

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

oltre 13 anni fa | 1

| accettato

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

oltre 13 anni fa | 1

Carica altro