Risposto
Why does the rotate function let the body rotate around the wrong axis?
Hello Felix, this shold be (assuming that the object's center is at (0,0,0) ) tilt = 23.4; rotationangle = 30; % for example...

quasi 6 anni fa | 0

Risposto
solve numerically a system of three equations the first of which defines a function and the rest of two involve integrals
Hi YG, Not having the toolbox for fsolve, I can't do any comparison calculations. As is usually the case, there is a tradoff b...

quasi 6 anni fa | 0

Risposto
Why fft results of discrete Fourier series coefficients are different from the actual definition
Hi Romio, I believe you are referriing to the convention where (informally speaking) f(x) = Sum c_n exp( 2*pi*i*f0*n*x) ...

quasi 6 anni fa | 0

| accettato

Risposto
How to solve parametric system of vector equations?
Hi Daniel, interesting problem. does this correspond to a particular physical situation? % P1 --> a, P2 --> b % solution i...

quasi 6 anni fa | 1

| accettato

Risposto
Spline and PPL discrete points
Hi Dhruv. your choice of a = 0.125 is kind of messing things up, because it's well above where the data ends. If you go only ...

quasi 6 anni fa | 0

| accettato

Risposto
solve numerically a system of three equations the first of which defines a function and the rest of two involve integrals
Hello YG, Fortunately the first equation is amenable to interation, at least for some parameters. In the code below, zeta1 --...

quasi 6 anni fa | 0

| accettato

Risposto
Trying to graph two differential equations on same plot
Hi Rodrigo, you have the following: function dydt=jallohwfun7(alpha,ep,xf,y,cao,k2,Fao) dydt=zeros(2,1); dydt(1)=-alpha*(1+e...

quasi 6 anni fa | 1

| accettato

Risposto
How to use tril function on only specific columns in a large matrix?
Hi Zuha, here's another, more vectorized version m = rand(31413,950); [r c] = size(m); [jj ii] = meshgrid(1:c,1:8); % ii ro...

quasi 6 anni fa | 0

Risposto
Keep getting an error message when integrating
Hi Rodrigo, try adding a dot to the function definition line, for element-by-element division: fun=@(x) Fao/(cao*k2)*(1+ep*x)....

quasi 6 anni fa | 2

| accettato

Risposto
Solving an ODE for a Complex Variable in Polar Coordinates
Hi Cameron, to solve the differential equation, ode needs real inputs so you could either use z = x+iy in the usual way or use ...

quasi 6 anni fa | 2

| accettato

Risposto
How to create a function as the convolution of two functions? Thanks
Hello James, fune=@(e)(e>=0).*(e<=1); funz=@(z)(z>=0).*(z<=1); funezt=@(ez,t)fune(ez-t).*funz(t); funez=@(ez)integral(@(t)fu...

quasi 6 anni fa | 1

| accettato

Risposto
for loop. finding the right index
Hello Ireedui, max and min find the indices as well as the values. changeInSOE = diff(stateOfEnergy) % find all the differen...

quasi 6 anni fa | 1

| accettato

Risposto
Can I determine the points (x,y) with a single line looping back and cross its self?
Hi A C Good one. I'm assuming that the x and y arrays are such that x(1:end),y(1:end) traces out a 'continuous' (so to speak) ...

quasi 6 anni fa | 2

| accettato

Risposto
arc length parametrization help me
Hello HY, You just need to go back to the basics. There is a vector x,y,z defined by a parameter (t in this case), so the rate...

quasi 6 anni fa | 1

Risposto
How to generate samples for cauchy distribution
Hi Mudit, the Cauchy distribtiion doesn't have a variance, since it doesn't have moments. But it does have a scale factor b. ...

quasi 6 anni fa | 0

Risposto
Scalar coefficients for a linear combination of matrices
HI Pierre-Luc [M(:) N(:)]\C(:) produces [a;b] This assumes that M and N are not proportional to each other, otherwise there...

quasi 6 anni fa | 1

| accettato

Risposto
Solving function in Matlab
Hi HD, Never a bad idea to do a plot. I modified the code a bit, so it does vector in with Ms, vector out. Could you explain ...

quasi 6 anni fa | 0

Risposto
Weird result, why I can't find -0.809 and 0.309 in -1:0.001:1???
Hello JX, you are looking for exact equality with floating point numbers, and a exact equality does not always occur. x = -1:....

quasi 6 anni fa | 0

| accettato

Risposto
Back-Calculating to Match Previously Established Variable
Hi Jonathan, you don't show the curve y(x), but given the number of points in x it appears that the curve y(x) is dense in poin...

quasi 6 anni fa | 0

Risposto
TE mode trascendental equation problem
Hi Carolina, do you have a reference for where you read that dielectric fibers have no cutoff frequency? I would be interested...

circa 6 anni fa | 0

Risposto
Need surface area of fsurf between two planes
<modified> Hi Erin, Here is a totally different method, based on the equation for the cone. It finds the surface area of a co...

circa 6 anni fa | 0

| accettato

Risposto
Periodic indexing of a matrix
Hi Andrea, for N points, index j, in 1 dimension, fnext largest index = mod(j,N)+1 next smallest index = mod(j-2,N)+1 then...

circa 6 anni fa | 1

| accettato

Risposto
Finding the values that make the Jacobian matrix singular?
Hi Missael, there is probablty a way to do this with symbolic variables in Matlab, but it's not necessary because the determina...

circa 6 anni fa | 0

| accettato

Risposto
Difference between single and double in matlab?
Hi ABT the reason is that you are adding a small number (18300) to a large number (550000000 +5000000 + 200000) and 'single' do...

circa 6 anni fa | 0

| accettato

Risposto
Need help finding the cartesian coordinates of a projectile in flight.
Hi Evan, Assume the two ground positions are p1 and p2. This method uses the 3d triangle p1,p2,and p3 (the intersection point)...

circa 6 anni fa | 0

| accettato

Risposto
DFT using matlab function
Hi mk, "Why does the frequency index not change even though the frequency is no longer the nominal value " When you do an ff...

circa 6 anni fa | 0

| accettato

Risposto
TE mode trascendental equation problem
Hi Carolina, It's not a real good idea to go with an answer solely on the grounds that 'solve' can find one from an expression ...

circa 6 anni fa | 2

| accettato

Risposto
How to use function toi with GHz frequency?
Hi Raul The problem is that you have 32 Hz as a sampling frequency. I assume here that you meant 32GHz. If you look at the ti...

circa 6 anni fa | 0

| accettato

Risposto
Checking values in a vector
Hello Jose if any(x(4:end)~=0) (do something) else (do something else) end

circa 6 anni fa | 0

| accettato

Risposto
solve equation whit integer output as a matrix
Hi Simon, you have z2/z1 = 3.9 % or 10*z2 = 39*z1 since 10 and 39 are relatively prime, i.e. they have no prime factors in...

circa 6 anni fa | 0

Carica altro