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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

Answered
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

8 years ago | 0

| accepted

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

8 years ago | 1

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

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

8 years ago | 1

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

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 1

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

8 years ago | 0

| accepted

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

8 years ago | 1

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

8 years ago | 0

| accepted

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

8 years ago | 1

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

8 years ago | 1

| accepted

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

8 years ago | 1

| accepted

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

8 years ago | 2

| accepted

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

8 years ago | 0

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

8 years ago | 0

Answered
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];...

8 years ago | 0

| accepted

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

8 years ago | 3

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

8 years ago | 0

Answered
Regarding calculating convolution in Matlab.
Hi Huidong, When you do c = conv(a,b) the array length of c is the sum of the array lengths of a and b, minus one. The resul...

8 years ago | 0

| accepted

Answered
How to modify FFT equation in Matlab?
Hi ailbeildce This is just a matter of setting a scale for the problem. The paper's eq. (8) shows the functions W in the fou...

8 years ago | 0

| accepted

Load more