답변 있음
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

대략 14년 전 | 0

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

대략 14년 전 | 0

| 수락됨

답변 있음
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...

대략 14년 전 | 0

답변 있음
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|. ...

대략 14년 전 | 0

답변 있음
alternative to diff(X)
x = 1:10; x(2:end)-x(1:end-1)

대략 14년 전 | 1

| 수락됨

답변 있음
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...

대략 14년 전 | 0

| 수락됨

답변 있음
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...

대략 14년 전 | 0

답변 있음
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 ...

대략 14년 전 | 0

| 수락됨

답변 있음
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...

대략 14년 전 | 0

답변 있음
help using fgetl function???
you should use while ~feof(fid)

대략 14년 전 | 0

답변 있음
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,...

대략 14년 전 | 0

답변 있음
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...

대략 14년 전 | 0

답변 있음
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...

대략 14년 전 | 0

답변 있음
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...

대략 14년 전 | 0

| 수락됨

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

대략 14년 전 | 1

답변 있음
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])

대략 14년 전 | 1

답변 있음
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)...

대략 14년 전 | 0

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

대략 14년 전 | 0

답변 있음
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...

대략 14년 전 | 0

답변 있음
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...

대략 14년 전 | 0

답변 있음
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...

대략 14년 전 | 0

답변 있음
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, ...

대략 14년 전 | 1

문제를 풀었습니다


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

대략 14년 전

답변 있음
Changing the figure font
x = 1:10; plot(x,'LineWidth',4)

대략 14년 전 | 0

| 수락됨

답변 있음
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...

대략 14년 전 | 0

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

대략 14년 전 | 0

답변 있음
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...

대략 14년 전 | 0

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

더 보기