Answered
Strange scaling issue with derivative implementation
Hi Nimrod, probably a bit late for an answer, especially one that doesn't really change anything. I believe that your code i...

8 years ago | 0

| accepted

Answered
Calculate elements in matrices
Hi Pei, To do multiply and divide operations element-by-element, put a dot in front of the mult or divide symbol. In this ca...

8 years ago | 0

Answered
for loop ode 45 changing parameter values
Hi gorilla3, Here is the simplest possible example of what ode45 is doing, that also inputs an extra parameter. To find th...

8 years ago | 0

| accepted

Answered
E-plane and H-plane patterns of a rectangular microstrip patch
Hi Maximiliano, Before getting to the plot, there are a couple of things in the code that need to be changed. [1] In the mul...

8 years ago | 1

| accepted

Answered
change bar color based on value
Hi Morgan, Unless you are trying to make a movie*, it's faster and more Matlablike to create A and B all at at once: N =...

8 years ago | 1

Answered
Finding the root of a function
Hi Lilach, After moving the syms x statement to the top so that the code runs, it is not so clear that it is going to get the...

8 years ago | 0

| accepted

Answered
Getting an error : In an assignment A(:) = B, the number of elements in A and B must be the same.
Hi Arun, Have you checked the value of RBF? I think it's quite likely that since you have supplied the value of 'a', you are...

8 years ago | 1

| accepted

Answered
Square wave function Mean Squared Error differing by a factor of 2?
Hi Jeff, It depends on how you want to look at it. For the entire square wave there are overshoots at the four locations bel...

8 years ago | 0

| accepted

Answered
Can a controllable matrix become uncontrollable due to matrix transformations?
Hello Z, You don't say what kind of transformations you have in mind. but generally det(B*A) = det(B)*det(A) det(...

8 years ago | 0

Answered
How to speed up code with ppval and integral
Hi Martin, Here's some code to integrate a piecewise polynomial on the basis of its polynomial coefficients, no actual numeri...

8 years ago | 0

Answered
GIBBS phenomenon & sum of squared differences
Hi Jeff, No, it's not really about the zeroth order coefficient. At a discontinuity, a fourier series converges at value hal...

8 years ago | 1

| accepted

Answered
Jacobi iteration code, not producing correct solution
Hi Arindam, Just before the while loop you need to reverse the two statements to make it x0=x; x=J*x+c; With the ord...

8 years ago | 0

Answered
Ask for creating new matrix from Odd-Indexed and Even-Indexed Elements
Hi Phat, you're close C = zeros(742,2); C(1:2:end,:) = A; C(2:2:end,:) = B;

8 years ago | 0

| accepted

Answered
symmetric vs asymmetric Fourier series
Hi Jeff, Yes it's a bad idea, assuming that a Friedlander fourier series is just a particular way of obtaining the usual fourie...

8 years ago | 0

Answered
Normalisation of FFT not consistent.
Good question. I didn't take a course in DSP, so I don't have a textbook recommendation from experience. Rodriguez mentions th...

8 years ago | 0

Answered
How can I normalize a function solved numerically?
Hi david, A normalization integral that small shows that the scaling could be improved upon, but as a workaround is this what...

8 years ago | 0

| accepted

Answered
How to standardize unstandardized beta coefficients
Hi Nuchto You forgot that you need to regress against the same y, otherwise it's apples and oranges. So the second regressio...

8 years ago | 0

Answered
Getting multiple roots of a function with infinite roots
Hi Sentient6, Here is a way that does them all in one go using Newton's method. It's good for either sign of C. x*tanx is a...

8 years ago | 0

Answered
Why am I unable to determine the number of iterations it takes to determine the solution vector? My number of iterations keeps equaling the maxIter
Hi Benjamin, In the third line of the Jacobian, try replacing 0, 0, (4*((5.67*10^-8)*(Tc^3)))+1.865, -1 with the corr...

8 years ago | 0

| accepted

Answered
How do I find the impulse response function
Hi Jaques, I believe the problem is that you have a couple of small errors in the 'a' vector (they don't agree with the origi...

8 years ago | 1

| accepted

Answered
Balance root-mean-square in audio clips
Hi Tahariet, You would like to normalize R and L so that the *sum* of R power and L power does not change from clip to clip. ...

8 years ago | 0

| accepted

Answered
Array multiplication along certain dimension?
Hi Visa, This seems to work A1 = 2; A2 = 3; A3 = 4; N = 7; A = rand(A1, A2, A3, N); V = rand(1, N); ...

8 years ago | 0

| accepted

Answered
interpolating curve with tangent ends
Hi Michal, depending on the data, the spline function could give good results. see help spline, where it says that if Y cont...

8 years ago | 1

| accepted

Answered
Why does the following simple Harmonic oscillator (without damping) behave as a damped harmonic oscillator?
Hi Sameer, I believe this is a standard numerical accuracy issue. Here is some shortened code that is basically the same as ...

8 years ago | 0

| accepted

Answered
Radiation pattern plotting.
Hi Yuval, I made a stylistic change to your code and defined theta at the very start with the factor of pi, rather than waiti...

8 years ago | 2

Answered
How do I only save my solution every x iterations in a for loop?
Hello J, If **numberoftimesIwantorecord** does not exactly divide **maxitimestep**, then there are two problems with this app...

8 years ago | 1

| accepted

Answered
How can I find a intersection of four ponits?
Hello Yoon, lots of possible expressions for this. Here is one that is pretty symmetric in the points. Let a = [x(n),y(n...

8 years ago | 0

Answered
integral function doesn't work well!
Hi Joe, this is interesting and probably worth a second question on this website for the following reason. Here is a function ...

8 years ago | 1

Answered
How to symbolically calculate the curl of a vector
Hi Max, this appears to work. >> minusdBdt = curl([E1,E2,E3],[x,y,z]) minusdBdt(x, y, z) = diff(E3(x, y, z), ...

8 years ago | 0

| accepted

Answered
I am trying to make a cos function at 19.8kHz, but the function produced by cos does not look like one, why is that?
Hi Justin, right now you are seriously undersampled on the cosine wave. You have 80000/19800 = 4.04 samples per cycle, so yo...

8 years ago | 1

Load more