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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 2

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 1

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

mehr als 9 Jahre vor | 2

| akzeptiert

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

mehr als 9 Jahre vor | 3

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

| akzeptiert

Mehr laden