Réponse apportée
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 = ...

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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.

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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'.

plus de 8 ans il y a | 0

Réponse apportée
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....

plus de 8 ans il y a | 0

Réponse apportée
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

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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 =...

plus de 8 ans il y a | 0

Réponse apportée
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^...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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, ...

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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)....

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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, ...

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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];...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 3

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Charger plus