Beantwortet
How to compute the mean amplitude of each frequency across trials?
Hi Becky, I assume you have trials changing down, time changing across (each row is a trial as a function of time). The firs...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to generate a matrix with the same correlation coefficient between all variables?
Hi David, MODIFIED the next thing that comes to mind is a = [2*ones(1,4);-2*eye(4);zeros(5,4)] + 5; a = ...

mehr als 8 Jahre vor | 1

Beantwortet
How can I make a square wave plot with discontinuity points?
Hi Adrian, If you can create a variable that contains *exactly* multiples of 180 as a function of the time array, then it's p...

mehr als 8 Jahre vor | 0

Beantwortet
How can i get desired frequencies appearing in graph ,from variables, created by spectrogram function?
Hi Abhishek It appears that you have the impression that the fourier spectrum of a snippet of a cosine (or sine) wave at freq...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Help plotting the Lennard Jones Potential
Hi Amanda, try plot(r,V) instead of plot(V.r) and ylim([-2,1]) For a more Matlablike approach you could calculat...

mehr als 8 Jahre vor | 0

Beantwortet
de Moivres Nth Root Function on returns 2 out 5 roots? Spot the fault?
Hi Owen, try k = 0:N-1; which gives all five values for k.

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
error using log too many input arguments
Hi Janrex, Since log_base_b(x) = log(x)/log(b) you could write your own function for that, just don't call it 'log'.

mehr als 8 Jahre vor | 0

Beantwortet
FFT function in matlab
Hi siyu, Things are actually working correctly, and the only real problem is that your wave is oscillating about the value 2....

mehr als 8 Jahre vor | 0

Beantwortet
How to plug in x value after I calculate an indefinite integral?
Hi Jiahui, try syms x a = int(1/x,x); double(subs(a,5)) ans = 1.6094

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How do I extrapolate a line and plot it?
Hi Michael, Since you are using Xextend = X(end) I don't see how you are extrapolating out to X = 2100. However, if Xextend...

mehr als 8 Jahre vor | 1

Beantwortet
Best fit line for log scale Y-axis and linear X-axis. I also want to extrapolate this line.
Hello Tsalsabilla 'life' is proportional to exp(-E), meaning that log(life) is proportional to E. E and log(life) have a li...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Iteratively solving using a for loop
Hi Rnle, In Matlab you can divide vectors term-by-term with the ./ command to obtain Vratio1. Then, since W = solve(x =...

mehr als 8 Jahre vor | 0

Beantwortet
Question about the implementation of the FFT function
Hi MaryM, Where did you get the information that Matlab you should zero-pad to get the "proper" length? And that fft with 2^...

mehr als 8 Jahre vor | 0

Beantwortet
Is there a way to pause the tic timer (without resetting tic)?
Hi David Here is a very basic way to accomplish this, no extra structures or anything. It works for a series of tic...[do st...

mehr als 8 Jahre vor | 1

Beantwortet
Why there is a difference between the dct computed by the MATLAB dct function and one computed by dct matrix multiplication?
Hi Mohsin, x needs to be a column vector as you did, but you don't need to take the transpose of dctmtx: x = 1:8 y1...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How can I make the Earth rotate around it's axis in matlab?
Hi Alexandru, MODIFIED answer I used a jpg of my own and reproduced your code, eliminating some lines that were not in use...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Why won't the imaginary parts of this matix equation show up?
Hi Charles, If I get the intent of the equation, it isn't showing up because you are using j as a do loop index, which sets i...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
bisection method error between approximation and actual root
Hi Rachel, What they mean is, as you proceed with the bisection method, you keep creating new xleft, xright and xmiddle value...

mehr als 8 Jahre vor | 1

Beantwortet
How can I plot BB spectrum with logarithmic x axis and y axis
Hi Marina, I believe the plots are basically correct, at least as far as they go. The shape does get changed quite a bit wit...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to specify same positive and negative axes-limits without knowing the limit values beforehand?
Hi Siddharth, Here is the simplest way, which assumes that the elements in the x array are all increasing or all decreasing, ...

mehr als 8 Jahre vor | 1

Beantwortet
Fast Fourier Transform (FFT) function won't work for more than 1x1 array of circular apertures
Hi Viron, While there is a diffraction pattern of a kind, it is not what is usually associated with diffraction by a circula...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Efficient way of storing a triangular matrix
Hi Xiaohan, Since you have several matrices, one option is to store them in pairs as a square matrix (plus one extra column)....

mehr als 8 Jahre vor | 1

Beantwortet
All combinations from a set of rows without repetition of elements
Hi Timo, It appears that for n even, the number of possible combinations of nonintersecting pairs is the product of all the o...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
Spectrum units of FFT in matlab
Hi Lman If you have a signal V in the time domain, say a cosine wave, then by the Matlab definition of the N-point fft, the ...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
Get the curve parameters in the fit function
Hi Denise, follow that command with p=coeffvalues(curvepar) The more 'convenient' they make some of these functions, ...

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
Implementation of mixed boundary conditions with finite difference methods
Hi Chris, The backslash approach works here, but I don't know how you could apply both boundary conditions from the very star...

mehr als 8 Jahre vor | 0

Beantwortet
Intermodulation products (third order) from MATLAB and FFT are too low
Hi Nathan, I ran my old toi code and came up with 24 dBm = -6 dBW which is pretty close to what you are looking for. The cod...

mehr als 8 Jahre vor | 0

Beantwortet
how does ellipse use for calculating orientation?
Hi shoaib, It makes sense to just make up some data, insert lines in the code and plot it out: ellipse = [1 2 3 4 pi/6];...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Fft real imag part
Hi a^2, this looks to be correct except for the scaling of the answer in the frequency domain. If you are using as the final r...

mehr als 8 Jahre vor | 3

Beantwortet
Is there any inbuilt function to calculate Appell F1 function in MATLAB? If no, is there any code available for this function?
Hi Gifty, The values 2 and 3 in the function are very favorable, and in that case an integral representation (according to Wi...

mehr als 8 Jahre vor | 0

Mehr laden