Answered

I want to highlight the curve of intersection of the sphare and the plane x+y+z=0 by a thick blue curve. How to do that?

Hi Atom, Your code doesn't work because if you multiply out X2^2 + Y2^2 + Z2^2, you don't get R^2. So that arc is not on the s...

I want to highlight the curve of intersection of the sphare and the plane x+y+z=0 by a thick blue curve. How to do that?

Hi Atom, Your code doesn't work because if you multiply out X2^2 + Y2^2 + Z2^2, you don't get R^2. So that arc is not on the s...

4 months ago | 0

| accepted

Answered

How can I change this explicit method code to the implicit method code?

Hi MC I am not sure what is meant by 'implicit method', and while numerical methods are good, there is also the exact expressio...

How can I change this explicit method code to the implicit method code?

Hi MC I am not sure what is meant by 'implicit method', and while numerical methods are good, there is also the exact expressio...

4 months ago | 0

Answered

How to plot the magnitude and the phase of this function f(1/z)=(0.5 + 000i)*z^(−1 )+ (0.2500 − 0.4330i)*z^(−2) + (−0.2500 − 0.4330i)*z^(−3)?

Hello Aisha, technically this equation should read f(z)=(0.5 + 000i)*z.^(−1 )+ (0.2500 − 0.4330i)*z.^(−2) + (−0.2500 − 0.4330i...

How to plot the magnitude and the phase of this function f(1/z)=(0.5 + 000i)*z^(−1 )+ (0.2500 − 0.4330i)*z^(−2) + (−0.2500 − 0.4330i)*z^(−3)?

Hello Aisha, technically this equation should read f(z)=(0.5 + 000i)*z.^(−1 )+ (0.2500 − 0.4330i)*z.^(−2) + (−0.2500 − 0.4330i...

4 months ago | 0

| accepted

Answered

How to Plot Ramsey Phase Plane

HI ec, There are a couple of issues here. First, the cdot expression lacks a dot, should be k.^(alpha-1). Second, the grid ...

How to Plot Ramsey Phase Plane

HI ec, There are a couple of issues here. First, the cdot expression lacks a dot, should be k.^(alpha-1). Second, the grid ...

4 months ago | 0

| accepted

Answered

How the plot of the phase of the complex function look likes BY USING THE MATLAB?

Hi Aisha, Taking the second part first, a phase angle can be either positive or negative. The Matlab angle function uses the u...

How the plot of the phase of the complex function look likes BY USING THE MATLAB?

Hi Aisha, Taking the second part first, a phase angle can be either positive or negative. The Matlab angle function uses the u...

5 months ago | 0

| accepted

Answered

Analytical solution for 1D heat equation

Hi Dominick, you have the sum of two sine terms for the boundary condition, sin(x) and (1/10) sin(10x). So consider a general ...

Analytical solution for 1D heat equation

Hi Dominick, you have the sum of two sine terms for the boundary condition, sin(x) and (1/10) sin(10x). So consider a general ...

5 months ago | 0

| accepted

Answered

Why is 0 and 30 1/2?

Hi Alexander; This occurs because heaviside(-.3:.1:.3) ans = 0 0 0 0.5000 1.0000 1.0000 1.0000 ...

Why is 0 and 30 1/2?

Hi Alexander; This occurs because heaviside(-.3:.1:.3) ans = 0 0 0 0.5000 1.0000 1.0000 1.0000 ...

5 months ago | 0

Answered

Difference between numerical and analytical solution of ode?

Hi IG, Here is an almost-analytical solution for x0 and x1 (which are called x and y respectively). It's analytic for x, uses ...

Difference between numerical and analytical solution of ode?

Hi IG, Here is an almost-analytical solution for x0 and x1 (which are called x and y respectively). It's analytic for x, uses ...

5 months ago | 0

Answered

I want to plot an implicit equation

Hi mohd, This is not really an implicit equation since Vgs appears only once, by itself, on the lhs. So you can take all the o...

I want to plot an implicit equation

Hi mohd, This is not really an implicit equation since Vgs appears only once, by itself, on the lhs. So you can take all the o...

5 months ago | 1

Answered

Circular Cross Correlation 2D Using FFT

Hi Ziv, yes, it works similarly. m = 5; n = 6; q = 4; A = randi(m,n,q); B = randi(m,n,q); C = zeros(size(A)); for j = 1:...

Circular Cross Correlation 2D Using FFT

Hi Ziv, yes, it works similarly. m = 5; n = 6; q = 4; A = randi(m,n,q); B = randi(m,n,q); C = zeros(size(A)); for j = 1:...

5 months ago | 0

Answered

How to get coefficients for second degree polynomial with only two given boundary conditions (means with two equations but with three coefficients)?

Hi Ankit, x = [ 0 1 2 3]; E = [0 1 4.5 10.5]; c = polyfit(x,E,2) % fit a quadratic E1 = polyval(c,x) figure(1) plot(x,...

How to get coefficients for second degree polynomial with only two given boundary conditions (means with two equations but with three coefficients)?

Hi Ankit, x = [ 0 1 2 3]; E = [0 1 4.5 10.5]; c = polyfit(x,E,2) % fit a quadratic E1 = polyval(c,x) figure(1) plot(x,...

6 months ago | 0

Answered

Is there any way to plot values that are exponent multiples of 10 as colorbar directly without having to take their log

Hi Mathan, The colorbars cover the same range in each case, but It's still apples and oranges. Consider the value 1e6 In log sp...

Is there any way to plot values that are exponent multiples of 10 as colorbar directly without having to take their log

Hi Mathan, The colorbars cover the same range in each case, but It's still apples and oranges. Consider the value 1e6 In log sp...

6 months ago | 1

| accepted

Answered

Can anyone help me? How can I solve 4th order Ordinary differential equations (ODEs)?

Hi Jihweon, Fortunately the analytic solution is pretty straightforward. Denoting Sp by A, the A^-4 factor matches up with the...

Can anyone help me? How can I solve 4th order Ordinary differential equations (ODEs)?

Hi Jihweon, Fortunately the analytic solution is pretty straightforward. Denoting Sp by A, the A^-4 factor matches up with the...

6 months ago | 1

| accepted

Answered

Getting complex value for real integration

Hi Mithun, One of the more straightforward methods is to forget about symbolics and just write down the solution for y. The el...

Getting complex value for real integration

Hi Mithun, One of the more straightforward methods is to forget about symbolics and just write down the solution for y. The el...

6 months ago | 0

| accepted

Answered

finding the maxima/minima using lagrange mutlipliers

Hi Ikenna, Here is one way. If you plot the function on the ellipse th = linspace(0,2*pi,1000); xx = cos(th); yy = sin(th)/...

finding the maxima/minima using lagrange mutlipliers

Hi Ikenna, Here is one way. If you plot the function on the ellipse th = linspace(0,2*pi,1000); xx = cos(th); yy = sin(th)/...

6 months ago | 0

| accepted

Answered

Unitary matrix with non-orthogonal eigenvectors?

Hi Joshua, I believe this happens because W has at least one set of degenerate eigenvalues, and does not happen if all the eige...

Unitary matrix with non-orthogonal eigenvectors?

Hi Joshua, I believe this happens because W has at least one set of degenerate eigenvalues, and does not happen if all the eige...

6 months ago | 0

Answered

Complex output after applying inverse fourier transform

Hi Brian, I beleive the result is due to asymmetric truncation of the image in the frequency domain. I am inferring that your ...

Complex output after applying inverse fourier transform

Hi Brian, I beleive the result is due to asymmetric truncation of the image in the frequency domain. I am inferring that your ...

6 months ago | 0

| accepted

Answered

Split array into subarrays

Hi David, if A is 200x1 the easiest way to do that is B = reshape(A,50,4) so now B is a matrix whose four columns are each 50...

Split array into subarrays

Hi David, if A is 200x1 the easiest way to do that is B = reshape(A,50,4) so now B is a matrix whose four columns are each 50...

6 months ago | 1

Answered

How solve this problem in Matlab

Hi Davide, here is a method that uses one for loop instead of two: n = 5 m = 6 V = zeros(n,m); V(:,1) = 1:n; for k = 2:m ...

How solve this problem in Matlab

Hi Davide, here is a method that uses one for loop instead of two: n = 5 m = 6 V = zeros(n,m); V(:,1) = 1:n; for k = 2:m ...

6 months ago | 0

Answered

trigonometric equation solution help

Hi Giuseppe Although Matlab can't come up with an analytic solution with symbolics, you can still obtain a numerical solution t...

trigonometric equation solution help

Hi Giuseppe Although Matlab can't come up with an analytic solution with symbolics, you can still obtain a numerical solution t...

6 months ago | 0

Answered

Efficient way of performing operation on array after performing cumsum

Hi Valentina, A = [1 2 3; 4 5 6; 7 8 9]; B = cumsum(A,2); C = (1:3).\B This gives the result that you show in your question....

Efficient way of performing operation on array after performing cumsum

Hi Valentina, A = [1 2 3; 4 5 6; 7 8 9]; B = cumsum(A,2); C = (1:3).\B This gives the result that you show in your question....

6 months ago | 1

Answered

Finding peak value of distorted sine wave signal with varying phase shift of harmonics

Hello Haroon, This answer addresses the first part, getting a maximum or "minimum-at-maximum" value. It's a lot easier to do t...

Finding peak value of distorted sine wave signal with varying phase shift of harmonics

Hello Haroon, This answer addresses the first part, getting a maximum or "minimum-at-maximum" value. It's a lot easier to do t...

6 months ago | 0

Answered

How to use syms to solve system of equations?

Hi NIcholas, This can be done without using syms. Syms of course can be slow, and the result in this case is a typically ponde...

How to use syms to solve system of equations?

Hi NIcholas, This can be done without using syms. Syms of course can be slow, and the result in this case is a typically ponde...

7 months ago | 2

Answered

How can I obtain the analytical expression (polynomial) of the spline curve from a curve fitting?

Hi Radu, x = 1:10; y = sin(x).^3; a = interp1(x,y,'spline','pp') a = struct with fields: form: 'pp' br...

How can I obtain the analytical expression (polynomial) of the spline curve from a curve fitting?

Hi Radu, x = 1:10; y = sin(x).^3; a = interp1(x,y,'spline','pp') a = struct with fields: form: 'pp' br...

7 months ago | 0

| accepted

Answered

sum of a sum of a sum of a sum

Hi Marta, The code below does not address the algebra in the paper, but I am posting this because it is another way of doing th...

sum of a sum of a sum of a sum

Hi Marta, The code below does not address the algebra in the paper, but I am posting this because it is another way of doing th...

7 months ago | 1

| accepted

Answered

How can I define proper frequency domain of FFT function in Matlab

Probably a bit late in the game, but the followiing code shows the peak at 300Thz. A couple of issues here: first to (a) get a...

How can I define proper frequency domain of FFT function in Matlab

Probably a bit late in the game, but the followiing code shows the peak at 300Thz. A couple of issues here: first to (a) get a...

7 months ago | 0

Answered

Best way to get rid of/ prevent function from creating complex numbers?

Hello Jeffrey, Deleting unsatisfactory results is of course not a good way to deal with this. I ran case {15} from your matfil...

Best way to get rid of/ prevent function from creating complex numbers?

Hello Jeffrey, Deleting unsatisfactory results is of course not a good way to deal with this. I ran case {15} from your matfil...

7 months ago | 1

Answered

Can I input data with multiple column lengths into one matrix?

Hi Brice, If you preallocate as you mentioned then you can insert each column with t = zeros(300,numslugs); x = zeros(300,num...

Can I input data with multiple column lengths into one matrix?

Hi Brice, If you preallocate as you mentioned then you can insert each column with t = zeros(300,numslugs); x = zeros(300,num...

7 months ago | 0

Answered

Trying to plot a frequency response (magnitude and angle) using the equation of a forced vibration

Hi Bryanna, The problem statement asks for delta_t of .01, but you have .1 instead. Changing to .01 makes things clearer. The...

Trying to plot a frequency response (magnitude and angle) using the equation of a forced vibration

Hi Bryanna, The problem statement asks for delta_t of .01, but you have .1 instead. Changing to .01 makes things clearer. The...

7 months ago | 1

Answered

How do I get rid of certain values with the same X-axis value in a certain range?

Hi Michael, here is one way, assuming that x (many values of which are repeated) and y are two columns. tol = 10; a = polyfit...

How do I get rid of certain values with the same X-axis value in a certain range?

Hi Michael, here is one way, assuming that x (many values of which are repeated) and y are two columns. tol = 10; a = polyfit...

7 months ago | 0

| accepted