Respondida
find all zeros
You can use |roots|, for example for x^2-1=0 roots([1 0 -1]) http://www.mathworks.com/help/techdoc/ref/roots.html

alrededor de 14 años hace | 0

Respondida
subplot axis scaling
You didn't specify x axis, that's why the x axis becomes the indices. Just do plot(y1,a)

alrededor de 14 años hace | 0

| aceptada

Respondida
In an assignment A(I) = B, the number of elements in B and I must be the same.
I don't quite know what your intention is, but the left side is a scalar and the right side in general is a vector, could be sca...

alrededor de 14 años hace | 0

Respondida
Undefined function or variable when using load and trying to operate with variables
The first variable in |save| is the file name, not the variable name. So in each of your files, the variable name is still |z|. ...

alrededor de 14 años hace | 0

Respondida
alternative to diff(X)
x = 1:10; x(2:end)-x(1:end-1)

alrededor de 14 años hace | 1

| aceptada

Respondida
day of the week in a month
You want to use if any(x==[2 9 16 23 30]) and so on. Also at the bottom, you seem to have an extra |else| hanging around...

alrededor de 14 años hace | 0

| aceptada

Respondida
Vectorization of this loop
x1=0; y1=1; inj_x=round(xwidth/2.0); inj_y=round(ywidth/2.0); [x2,y2] = ndgrid((1:ywidth)'-inj_y,(1:xwidth)'-inj_x...

alrededor de 14 años hace | 0

Respondida
Why my butterworth low pass filter doesn't work?
I don't understand. I modified your code a bit to do * Use filter operation in time domain * Use 200Hz as cutoff frequency ...

alrededor de 14 años hace | 0

| aceptada

Respondida
Why my butterworth low pass filter doesn't work?
Please format your code. But just a quick note, if you set cutoff frequency at 300Hz, the 300Hz component will not be eliminated...

alrededor de 14 años hace | 0

Respondida
help using fgetl function???
you should use while ~feof(fid)

alrededor de 14 años hace | 0

Respondida
envelope function
For a signal x, you can use the following code to get the envelope t = 0:0.01:1; x = exp(-t).*sin(2*pi*10*t); plot(t,...

alrededor de 14 años hace | 0

Respondida
Contour a log fuction with n contour levels
There are negative numbers in log so the result may be complex. In addition, there is zero in log, so log(0) gives infinity, whi...

alrededor de 14 años hace | 0

Respondida
Levinson algorithm
Hi Shweta, It is true that the algorithm only solves n unknowns, but if you look at the reference page below, the returned re...

alrededor de 14 años hace | 0

Respondida
Traping Error user input
Is this what you want? n=inputdlg('Please input a number more than or equal one:') while isempty(str2num(n{1})) || str2n...

alrededor de 14 años hace | 0

| aceptada

Respondida
How do I create a vector with a multiply sequence?
Another one flipud(100*diag(vander(repmat(0.7,1,10))))

alrededor de 14 años hace | 1

Respondida
How do I create a vector with a multiply sequence?
Just for fun filter(1,[1 -0.7],[100 0 0 0 0 0 0 0 0 0])

alrededor de 14 años hace | 1

Respondida
slicing multi-dimensionsal arrays
In your code, you only passed on data input to |cat|. You can try the following cat(1,ary3d(2,:,1),ary3d(2,:,2),ary3d(2,:,3)...

alrededor de 14 años hace | 0

Respondida
Plotting 2 Matrices
You can try surf(matrix1,matrix2) and see if that's what you want.

alrededor de 14 años hace | 0

Respondida
loglog graph analyses
loglog uses 10 based logarithm for both X and Y, so if the resulting figure is a straight line and you want to calculate the slo...

alrededor de 14 años hace | 0

Respondida
Fourier Transform of Swept Sine Signal
Looks to me within 2 seconds your signal sweep from 0 to 800Hz, so it's not really a 400 Hz sweep. Given your signal is real, it...

alrededor de 14 años hace | 0

Respondida
The question about signal power in watts
I assume your signal, |y|, is the voltage signal in volts, and the load is 1ohm, then the power is 0.5 watts Here is an examp...

alrededor de 14 años hace | 0

Respondida
A little bit tricky 2d plots
1. plot([A B C]); 2. plotyy(X1,[A B],X2,C); but because MATLAB always do the x axis from smallest to largest, ...

alrededor de 14 años hace | 1

Resuelto


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

alrededor de 14 años hace

Respondida
Changing the figure font
x = 1:10; plot(x,'LineWidth',4)

alrededor de 14 años hace | 0

| aceptada

Respondida
An error at modulation process
It seems taht your evelope1 is derived from the input sound, while your car1 has the dimension of t, so the two don't match in s...

alrededor de 14 años hace | 0

Respondida
3d-dwt
You may also find the following demo useful http://www.mathworks.com/products/wavelet/demos.html?file=/products/demos/shippin...

alrededor de 14 años hace | 0

Respondida
Making function to calculate value when user inputs date
I think you need more information. Given only month and date, how can you figure out the weekday information? Or is it for a giv...

alrededor de 14 años hace | 0

Resuelto


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

alrededor de 14 años hace

Resuelto


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

alrededor de 14 años hace

Resuelto


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

alrededor de 14 años hace

Cargar más