Réponse apportée
Natural Cubic Spline interpolation
Hi Bella, you can get the coefficients of the piecewise polynomials for each segment with pp = interp1(x,y,'spline','pp') or ...

presque 5 ans il y a | 0

Réponse apportée
solving simultaneous equations of fourth order PDE in MATLAB
Hello Devansh Since you have boundary conditions at both x=0 and x=L you can use bvp4c to solve this. But I believe you have t...

presque 5 ans il y a | 0

Réponse apportée
the final result of laplace transform still contain laplace function?
Hello ZH Matlab doesn't know if taoc is positive or negative. If taoc is negative, the calculation can't really be done. Tha...

presque 5 ans il y a | 1

Réponse apportée
Help With ODEs Solver(ode45)
Hi Ahmed, repeating the plot command every time in the nested for loops is not helping, For a smaller case (I didn't want to w...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Symbolic differentiation of Bessel functions is incorrect
Hi Sam, There is really nothing going on. Both of those identities are correct, as you can check numerically. There are sever...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Permutation matrix P in the qr function
Hello Gabriele, I don't think you can conclude anything about the columns of A. That's because the usual qr decomposition is u...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Antenna radiation pattern rotation
Hi Marina, Since you are using surf, I am going to assume that you have three matrices x,y,z, each of size m x n, appropriate t...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
How to create an average of 2 lines on a single graph
Hi Charley since the second half of the distance array has exactly the same values as the first half (only reversed), you can u...

presque 5 ans il y a | 0

Réponse apportée
Euler Angles from Rotation Matrix
Hi Gregory, If you mean you want the form of the rotation martrix in terms of alpha,beta,gamma, that's just syms a b g R1 = [...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
roots of the complex equation with one variables
Hello Varun, Your code gives for solutions b = 30.857 - 175.74i -94.032 - 211.56i 70.398 - 342.7...

presque 5 ans il y a | 0

Réponse apportée
multiple r values for multiple theta values
Hi Allan For an element-by-element calculation, use ./ and .* rather than / and * theta=[pi,3,2.8,2.5,2,pi/2,1.3,1.0,0.75...

presque 5 ans il y a | 1

Réponse apportée
Modifying 'Bessel second-order ordinary differential equation' in matlab library.
Hi K^2, Picking kr as the argument, take a look at J(kr) and do the differentiations on d^2/dr^2 J(kr) + (1/r) d/dr(J(kr). Ta...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
solving a system of 2nd order 2 ODE: output vector length not matching the initial condition vector length
Hi yosri, the reason this is happening is that the expression for dy/dt has four elements, but one of them contains diff(y(4)) ...

presque 5 ans il y a | 0

Réponse apportée
Create a vector field
Hi ALvaro, The code below sets P=Q=0 to make the spacial dependence more clear. Rather than meshgridding the 1d velocity vecto...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
how can i calculate z^2 distibution?
Hello JS By gaussian I assume you mean the normal distribution, mean 0, std deviation 'a' f(z) = N*exp(-(z/a)^2/2) with N =...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Solve function returns expression in terms of z
Hello Ashmika, You do have a symbolic solution for h, which goes to show that symbolic solutions are not always the ideal. The...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How can I get randperm to return a permutation of a vector that has no entries at their original positions?
Hi Darcy, the methods I have seen here seem to involve trying randperm and rejecting the result if an element remains in the sa...

presque 5 ans il y a | 0

Réponse apportée
Imaginary numbers when solving ode (ode15s)
Hello YF, whenever unexpected complex quantities start appearing, it's time to look for the usual suspects, which tend to be ei...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Q Factor is not same
Hello Abdullah be aware that what you are calling alpha is often called alpha/2, but I don't think that had anything to do with...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
How does nanstd function process complex numbers
Hi Luciano I'm not sure what you are referrng to with " nanstd(C) returns a complex matrix with dimentions equal to C and rea...

presque 5 ans il y a | 0

Réponse apportée
Power calculation from Voltage and current waveforms
Hi Stefano, The biggest issue is that when using trapz, you have not taken into account the width of the time steps when doing ...

presque 5 ans il y a | 0

Réponse apportée
FFT and Parseval's Theorem
Hi Chen, Here are a couple of ways. Since the time function fills up the entire time window (as opposed to being some kind of ...

environ 5 ans il y a | 3

Réponse apportée
In the sine wave source is the formula that links samples per period and sample time correct? It says: Samples per period = 2*pi / (Frequency * Sample time), but I believe it should be Samples per period = Sample time / Frequency.
Hello Ilaria, I believe it is neither of those. Rather it is what is in the PNG with the 2pi crossed out: samples/period = 1/...

environ 5 ans il y a | 0

Réponse apportée
Need help with this integral ? what is opstruct in integralcalc?
Hello HA I assume N is defined further on up since Matlab was not complaining about that. Try fun_2=@(t)(ones(size(t))*N); a...

environ 5 ans il y a | 0

Réponse apportée
How to obtain the coordinate of the maximum value in the Cross ambiguity function
Hi John, Not having the phased array system toolbox I don't know how the plot axes are oriented, but I think one of the two pos...

environ 5 ans il y a | 0

Réponse apportée
solving ode equation using ode45
Hi nadeeshani, UPDATED ANSWER This is a speculative answer, but perhaps you did not take the square root when you calculated t...

environ 5 ans il y a | 0

Réponse apportée
Why am I only getting partial streamlines.
Hi Boris, the problem is the line sy = sx./sx which creates a vector of ones for sy. Then every streamline originates at the h...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Non-Integer For-Loop
Hi Christopher for h = 0:.1:1 works, although with the interval expressed in floating point, you have to be careful. for ...

environ 5 ans il y a | 2

Réponse apportée
Why is dsolve solution halved from real answer?
Hi Miles, One of your conditions is dy/dt = 0 which is iffy, since there is a dirac delta function at the origin and you are no...

environ 5 ans il y a | 4

Réponse apportée
error in computing atanh
Hello Francisco, The imaginary part is i*pi/2, so the two answers are a+i*pi/2 and a-i*pi/2, where a is real. Both answers are...

environ 5 ans il y a | 1

| A accepté

Charger plus