Respondida
Recursive loops in MATLAB
Hi Ricardo, here is a method using a function I created recently that is related to the adjustable-dimension issue. This is th...

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 2

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 1

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

más de 9 años hace | 2

| aceptada

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

más de 9 años hace | 3

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

Cargar más