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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 1

| accettato

Risposto
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 =...

oltre 8 anni fa | 1

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

Risposto
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;

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

| accettato

Risposto
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); ...

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 2

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 1

Risposto
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), ...

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 1

Carica altro