Respondida
How do I capture the output from "display"
Hi Eric, If there is no native support to capture display, you can try |diary| function. Something like this: diary FILE...

alrededor de 14 años hace | 0

| aceptada

Respondida
I cannot make a calculation with the command int
looks to me you have a singular point between -1 and 1 at 4752731968273649/18014398509481984. This might be why

alrededor de 14 años hace | 0

Respondida
Any quick way to generate coordinates (by 3or more independent variables) and plot them?
These two are a little different. |ezmesh| treats the first 3 inputs as functions, so the fact you have three scalars there just...

alrededor de 14 años hace | 0

Respondida
array of numbers to chars in separate cells
E = cellfun(@num2str,mat2cell(F,1,ones(1,4)),'UniformOutput',false)

alrededor de 14 años hace | 0

| aceptada

Respondida
array of numbers to chars in separate cells
E = mat2cell(F,1,ones(1,4)])

alrededor de 14 años hace | 0

Respondida
How to define transfer function into the tf or ss format
This is already in state space form. Your A,B,F are just A,B,C. Your D is 0 http://lpsa.swarthmore.edu/Representations/SysRep...

alrededor de 14 años hace | 1

Respondida
Matlab indexes
Links below could be useful http://www.mathworks.com/help/techdoc/ref/colon.html http://www.mathworks.com/help/techdoc/ref...

alrededor de 14 años hace | 1

Respondida
Issue with 3Sum problem!
Your line for T = @(a,b,c) (a + b + c) does not really specify a loop. What you want is to find some a, b, and c whose s...

alrededor de 14 años hace | 0

| aceptada

Respondida
Filter implementation to ECG signal
Since you want to use a filter, the first thing you need to do, before running any command, is to come up the parameters, such a...

alrededor de 14 años hace | 0

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

más 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...

más 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))))

más 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])

más 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)...

más de 14 años hace | 0

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

más 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...

más 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...

más 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...

más de 14 años hace | 0

Cargar más