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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 1

Respondida
i need to find the stagnation point for the following code
Hello Anthony, Good looking result. If at the end you put figure(2) quiver(x,y,U1,V1) axis equal grid minor ...

más de 8 años hace | 0

Respondida
error Inner matrix dimensions must agree?
Hi safisay, presumably you want to multiply all the vectors together element-by-element so in the expression for M you have to ...

más de 8 años hace | 0

| aceptada

Respondida
Overlapping time-intervals
Hi Rostislav It looks like you want the union of closed intervals. Here is some code that I think does the job. When the e...

más de 8 años hace | 4

| aceptada

Respondida
Reading user input when input is a combination of letters?
Hi Stenila, You need to get the user input as a string using the 's' option, not the usual input. Right now Matlab thinks th...

más de 8 años hace | 2

Respondida
why it doesnt return inverse fourier transfrom?
Hi jasleen, It doesn't work because with the for loop you are giving ifft the elements of n1 one at a time. Each of those fo...

más de 8 años hace | 0

Respondida
Problem with finite difference
Hi Paul, You did not say what h is, but I took it to be 2/n. After replacing Mx with its transpose, which changes the sign o...

más de 8 años hace | 0

Respondida
A function smart enough to sort coordinates of block into sub-blocks?
Hi Xiaohan, Here is some code that creates a 4x3xn 3d matrix sqquares (misspelled on purpose) where each level of sqquares in...

más de 8 años hace | 0

Respondida
How to create a best fit line on a loglog scale graph with 3 different lines (3 different datas)
Hi ckN, ***** See Addendum to answer, below ****** After you find the fit coefficients with polyfit, then you can use poly...

más de 8 años hace | 0

Respondida
Help with FFT and Dominant Frequency
Hi Saad, The fft of a pulse train of uniform spikes is another pulse train of uniform spikes, not just a spike at a single fr...

más de 8 años hace | 0

Respondida
How do I get a outer loop in a polar plot in MATLAB
Hi Union Olive, If you replace U_total_1 = (A_sen *(Ang_freq*d)/c)*(Beta_1+cos(theta)); with U_total_1 = abs(A...

más de 8 años hace | 0

| aceptada

Respondida
Why does my if statement do the opposite?
Hi Erwin The test h==-h is not a test for whether h is negative. This test is the same as 2*h==0 and always fails unless h =...

más de 8 años hace | 0

| aceptada

Respondida
Understanding convolution, 'same' might give wrong result
Hi Silke, Yes, this is a direct result of using the 'same' option. If you take a look at the convolution without that option...

más de 8 años hace | 1

Respondida
fibonacci function in 2016
Hi Eric, If you don't have the symbolic toolbox you can do this numerically with the filter function which is part of basic M...

más de 8 años hace | 1

Respondida
How to integrate a distribution function for a specific interval?
Hi Nina, If this is not a misinterpretation of the problem, then it seems to work. I am assuming that the function ecdf is a...

más de 8 años hace | 0

Respondida
Why do I get this error for my gauss seidel code?
Hello Peter, try if sentinel == 1 && x(i) ~= 0 instead of if sentinel = 1 && x(i) ~= 0

más de 8 años hace | 0

Respondida
Fast Fourier Transformation (FFT) on low sampling rate data
Hi Muhammed, The highest frequency that you can get to with the fft is the Nyquist frequency, which is half the sampling rate...

más de 8 años hace | 0

| aceptada

Respondida
Having trouble with "Matrix is singular to working precision" error, would be glad if you help
Hi utkuzzz, The command L/G is the same thing as L*inv(G), although computationally L/G is certainly the preferred way to do ...

más de 8 años hace | 1

Respondida
Fundamental issue with trapz() function (or not?)
Hi Alvin, --- Modified Answer ---- The width of the peak is around 1e-4. So for trapz to work, you need the spacing in t...

más de 8 años hace | 0

| aceptada

Respondida
Inverse tangent inaccuracy?
Hi Robert, All you need do is replace the expression for theta4a by theta4a = 2*atand((-B +sqrt((B^2)-(4*A*C)))/(2*A)) ...

más de 8 años hace | 1

| aceptada

Respondida
How do I do numerical summations or integrations?
Hi Natalia, To use 'integral' you have to make sure that your function can produce a vector output given a vector input of u ...

más de 8 años hace | 0

Respondida
How do I do numerical summations or integrations?
Hi Natalia, What Eric says is true in theory, but as with a lot of these kind of problems,you have to take a look at how many...

más de 8 años hace | 0

Respondida
How to solve this integral?
Hi Leonardo, You can do the integral in the following way. Let [p/4 - phi(x)] = u(x) where u(x) --> 0 as x --> inf...

más de 8 años hace | 0

Respondida
Simplify matrix to have ones in diagonal
Hi amintr, You can use d = diag(A); A_new = A./d; % newer versions of Matlab with implicit expansion b_n...

más de 8 años hace | 0

Respondida
Problem with fzero to solve transcendental equation
Hi Nihal, in the function definition, try deleting the * following the second incidence of 'exp'.

más de 8 años hace | 0

Respondida
Solving for unknown matrix?
Hi Andrew, I understand that you are looking for a symbolic solution, but if G were a matrix of numbers, then phi = C\G/...

más de 8 años hace | 1

Respondida
Extract surface coordinates from ellipsoid function
Hi LW, After you get x,y, and z, try A = [x(:),y(:),z(:)]

más de 8 años hace | 1

| aceptada

Respondida
How to find normal vectors that lie inside a cone
Hi Queens, Here is a method based on the idea that for normal vectors inside the cone, the dot product of the normal vector w...

más de 8 años hace | 0

Respondida
Need angular momentum error < 1% - Don't know why error values aren't changing w/ changing time step
Hello Kyle, Right now you are calculating the orbit using r and v and you don't need any other variables to do that. However...

más de 8 años hace | 0

Cargar más