Answered
Trying to solve time of charge of supercapacitor with ode45
Hello Isaac It seems easier to do this as two first order equations for the node voltages V1 and V2 rather than go to a second ...

6 years ago | 0

| accepted

Answered
How to use one ode45 to solve another?
Hi Carlos, you can toss them all in together, with g(1) = y(4) and g(2) = y(5). That way y(1) is available in context. t0=0; ...

6 years ago | 0

| accepted

Answered
Warning: Matrix is singular to working precision.
Hi y, In the future it would help if you copied in text rather than an image, so as to make it easy to run without retyping. I...

6 years ago | 0

Answered
Bessel functions of order zero
Hello Hasan, Per the reference, try the same code with besseli(n,lrp) [modified bessel function ] instead of besselj. These...

6 years ago | 0

| accepted

Answered
Multiplying each row vector by its transpose and summing each of the resulting matrices
Hi SYK n = 326 m = rand(3,n); % example initial matrix, 3x326 S = m*m' that's it, the result. Same as S33 = zeros(3,3,...

6 years ago | 0

Answered
Newton's solver not converging for 1D nonlinear diffusion equation.
Hi Patrick, The problem appears to be normalization. The diffusion term, being linear in N, does not care about normalization ...

6 years ago | 0

Answered
Extremely high THD in FFT Toolbox
Hi LS, The signal shows exactly six oscillations in .0025 sec, so it indeed consists almost entirely of the sixth harmonic (plu...

6 years ago | 1

| accepted

Answered
How to make the line of best fit go through the origin?
Hello Ash, Effectivenormalstress=[41,79,119,159,197,80]'; % make these into column vectors Maximumshearstress=[34,73,97,138,1...

6 years ago | 1

| accepted

Answered
How can i change this code????
Hi KK, yes, nine equations, three unknowns. However, [1] from eqn3 you can find phi. There are two solutions for phi, one cl...

6 years ago | 0

Answered
Return submatrix that has Full Rank
Hello Shubham, % make up an example nrow = 5; ncol = 10; % ncol > nrow A = rand(nrow,ncol); A = [A(:,1),A(:...

6 years ago | 0

Answered
Plotting system of equations for a phase diagram
Hi Eric, let T1 = 1357; T2 = 1726; T = T1:T2; if you exponentiate both sides of each equation, you get x1/x2 = f (1-...

6 years ago | 0

| accepted

Answered
Plotting Inclined Rankine Oval
Hi tag, Atan2 is restricted to -pi < atan <= pi, so when the angle increases past pi you get a jump down to -pi That occurs wh...

6 years ago | 1

| accepted

Answered
ode45 Set of 3 second order ODE not solving correctly
Hi William, you are close on this. x1,x2,x3 are postions and x4,x5,x6 are velocities so the appropriate lines of code are dxd...

6 years ago | 0

| accepted

Answered
Find greatest common denominator of two values to get integer
Hello Charlotte, In terms of your original question, you have integers A and B and you want to divide them by a number x such t...

6 years ago | 1

Answered
how to find the position of in the matrix without using the neither find nor built in functions.
Hi Umut, all you need do is use a couple of 1x2 arrays to store a and and b when you find them When inside the for loops when ...

6 years ago | 0

Answered
double integration of parametric function
Hi Danny, You can find the surface area by finding the vectors Du and Dv that are parallel to the surface when you vary u and v...

6 years ago | 0

| accepted

Answered
solving for simple Integration symbol
HI AC d/drho (-)*log(b*rho-1) = (-)*1/(b*rho-1)*b = b/(1-b*rho) = q1 so it is correct. But your result is correct as well. I...

6 years ago | 2

| accepted

Answered
how can i simplify this expression
Hi Dror, n1 = 10; % in case the dimensions are not all the same n2 = 6; n3 = 33; n4 = 28; u = rand(n1,n2,n3,n4) + i*rand(n...

6 years ago | 0

| accepted

Answered
Code not working, velocity comes back the same each time
Hello Oliver, could you say where you got this problem? I am interesed in finding out since the problem keeps reoccurring on t...

6 years ago | 0

Answered
Normalization for the fft of a wavefunction in momentum space
Hi Peter, the factor of 1/N is used to find the amplitudes of continuous wave sines and cosines. Here you are approximating a ...

6 years ago | 1

| accepted

Answered
How to fix this weird plot behaviour?
Hi Adrian, figure(1) plot(vysledkyM, 'r'); ylim([678, 685]) hold on plot(vysledkyU, 'b'); plot(vysledkyS, 'g'); legend('d...

6 years ago | 1

Answered
FFT Fast Fourier Result not stable
Hi HZ, It's good that you are working this stuff out. Not enought people do that. WIth a few exceptions the result of an fft ...

6 years ago | 1

| accepted

Answered
Is it possible to make Acos return values greater than pi?
Hi Berke, I wrote a clarification to your previous question which I think should resolve that issue. It looks like you have de...

6 years ago | 1

| accepted

Answered
Using ifft2 to transform wavenumber-frequency to space-time
Chirag, It's pretty clear in the time domain. With array spacings delt and delf in the time and frequency domain respectively,...

6 years ago | 0

Answered
Determining the phase shift from the samples of the sinusoidal wave?
Assuming that w is known, and that you have an identical time array for each of A and B, and that t and B are column arrays, the...

6 years ago | 1

| accepted

Answered
How to determine time lag by using xcorr ?
Hello Linda, the idea is basically correct, but for two signals of the same length, zero lag is at the center of the resulting ...

6 years ago | 0

| accepted

Answered
ODE45 Returning Wrong Signed Answer
Hi h7, I'm guessing that you want to start at 60 degrees and not 60 radians, so try y0 = [60*pi/180;0]; [ts,ys] = ode45(@ph...

6 years ago | 0

| accepted

Answered
one-to-one mapping of a vector based on error bounds
Hi Jonah, x(-14 < x & x < -8) = -13; x(-8 < x & x < -2) = -6; What happens if x =8? Looks like you could use <= in pla...

6 years ago | 0

Answered
The spacecraft free-fall math model
Hi Sanzhar & Luke, This problem keeps bouncing around on other posts, so it's time to check out what is going on. Although the...

6 years ago | 1

Answered
How to generate a round robin schedule with 4 players in each game
HI Jacob, here's a standard way to create an n team round robin schedule (n even), teams plays each other once. sched = [mod([...

6 years ago | 0

Load more