Réponse apportée
fsolve Finite difference - Problem: "indices must either be real positive integers or logicals"
Hi Max, You did not mention where in the code the error occurred, but certainly you will get such an error with for j=1:N-...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Problem with multiple values on plot
Hello Catherine, The last line will probably work if changed to text(L_val,L_pks,num2str(L_val'),'fontsize',12); this i...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
error when using min function
Hi Andrew, this is a hypothetical answer but it may be that you have, somewhere else, defined 'min' to be a variable .e.g min ...

plus de 9 ans il y a | 2

| A accepté

Réponse apportée
Is there a simpler way to produce an rgb image from a grayscale matrix based on custom thresholds?
Hello Andrew, Red = zeros(size(B)); Green = zeros(size(B)); Blue = zeros(size(B)); Red(B<=120) = 255; Blue(...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
3D interpolation question
Hello S, You are close on this. Right now you are making a finer 81x81 matrix and looking at its 1,1 element, which is off in ...

plus de 9 ans il y a | 0

Réponse apportée
Using MATLAB i want to find a polynomial q(s) such that s5 + 7s4 + 20s3 + 30s2 +24s + 8 = p(s)q(s) . where as p(s) = s3 + 3s2 + 4s + 2.
Hi Husain, go to 'help deconv' and take a look at that function, keeping in mind that in Matlab a vector of polynomial coeffici...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
inverse power method for smallest eigenvector calculation
Hello Turker, There is nothing wrong here. The eigenvalue equation is A*v = lambda*v and so for the eigenvector, both ...

plus de 9 ans il y a | 1

Réponse apportée
Duration & Calendar Duration. What is the difference?
Hello vc, Calyears and years are two different quantities. Calyears add a year, taking into account leap years, and gives th...

plus de 9 ans il y a | 2

| A accepté

Réponse apportée
How does if(0) work within a function?
Hello Padma, if(0) always comes up false, so the operations after the 'else' statement will always be performed. It's a low-re...

plus de 9 ans il y a | 3

Réponse apportée
Please help, the value of a function is changing with the domain.
Hello Joshua, For each variable, try this with extra dots in the locations shown. This is because it appears that you want ter...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Normalization of the eigenvectors in eig(A) vs. eig(A,eye(length(A)); Orthonormality relationship
Hello Jerome, It's an interesting question why Mathworks chose not to normalize the column vectors in V2 and W2 when they did s...

plus de 9 ans il y a | 0

Réponse apportée
define associated legendre by hypergeometric functions
Hi Kurt, Probably the easiest thing to do is look up associated legendre polynomials on wikipedia, where they provide the expre...

plus de 9 ans il y a | 0

Réponse apportée
FFT in dB scale
hi Alexander I assume you are looking for a couple of peaks at -6 dB. Otherwise this answer will not be of help. But to get -...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
Plotting plane through point arrays midpoint
Hi Chaosante, The basic problem here is that the equation for the plane is (in free notation) [(x,y,z)-(xmean,ymean,zmean)...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How the implement a 3-fold sum?
Hello Stephen, Here is one way, although you do make three arrays of the same size as M: [xx yy zz] = ndgrid(x,y,z); S ...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How can I solve y''+yy'=0, y(0)=1, y'(0)=-1 in matlab?
Hello Grace, y = -tan(x/2 - pi/4)

plus de 9 ans il y a | 0

Réponse apportée
Show that a larger number is bigger than another large number
Hello Delia, If what you need to know is which is larger, then John has certainly addressed that. However, I was thinking that ...

plus de 9 ans il y a | 0

Réponse apportée
Definite integral with complex number
Hello Diana, symbolic variables are a great thing, but if you are looking for a numerical result and are happy with 15 or so si...

plus de 9 ans il y a | 0

Réponse apportée
Energy calculated from an image doesn't match with the energy calculated from its Fourier transform
Hello IPN, I assume you mean sum(sum(...)) rather than sum(...). It appears that you are assuming a constant of proportionality...

plus de 9 ans il y a | 0

Réponse apportée
Polyfit on semilogy. Straight line equations and intercept point
Hello Emanuele, when you are looking at a semilogy plot you are interested in log(y) vs. x. So you need to go into log-land an...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
How can I test if a number is irrational?
Hello Alexandre, although your interest is along conceptual lines, still it's fun to look at practical consequences. Supposing...

plus de 9 ans il y a | 0

Réponse apportée
How do I make this 2 dimensional vector follow a formula
Hello Jesse, The standard way to do this is with the meshgrid function: x = 1:10; % or whatever size it is y = 1:10...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
frequency domain linear regression
Hi Jan, You are correct that k is the index corresponding to frequency. In an fft, k = 6 always corresponds to 6 oscillations ...

plus de 9 ans il y a | 0

Réponse apportée
Integral gives wrong answer
Hello Frank, This might be more of an observation than an answer, but one point not in your favor is that since log10(x) = log(...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
I want to convert the output of transient analysis of cantilever beam from time domain to frequency domain, so i used the fft function as below. But i am not getting the correct answer. Please anyone can help me to solve this problem
Hi Siddesha, please format your code by highlighting it, using the {}Code button and using ENTER if necessary to make individual...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Issue plotting maximum and minimum roots of polynomial
Hi Peter, I believe that the basic problem here is the three lines of code T(i) = 63.2 + i; Tre = T(i)/Tc; f = A...

plus de 9 ans il y a | 0

Réponse apportée
How to convert the x an y axis to frequency in plotting 2D FFT?
Hi Poorva, If what you are ffting is truly a 2d time array, then there will be a sampling frequency for each direction. In tha...

plus de 9 ans il y a | 0

Réponse apportée
Why are the peaks of my spectrum not exactly at the frequencies of my sinusoidal input signal?
Hi Luc, I don't believe that the fft or ifft is necessarily inaccurate just because it is discrete or has finite boundaries. Y...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Combine phase and magnitude of a 2D fourier transform in one image?
Hello Dai, If you are not aware of the function hsv2rgb you should check into it, since if you properly input mag and phase it ...

plus de 9 ans il y a | 0

| A accepté

Charger plus