Respondida
Why do I get an index error?
Hi Sherwin, May be there shouldn't be negative indices, but there actually *are* negative indices, as Guillaume has pointed out...

casi 10 años hace | 0

Respondida
low-pass exponential filter - fourier space
Hi Aude, To construct a filter in this situation it's convenient to use a frequency array with zero frequency in the center. I...

casi 10 años hace | 0

| aceptada

Respondida
How to get the equation for a cubic spline from cubic spline function?
Hello Gina, If you use spline in the form pp = spline(x,y) you will get a structure that contains all that information....

casi 10 años hace | 1

Respondida
Why matlab cannot return orthogonal eigenvectors for a normal matrix?
Hello Ran, If a matrix A is normal it can be diagonalized with a unitary matrix, A = U D U', but no one is saying that the set ...

casi 10 años hace | 0

| aceptada

Respondida
I have to follow a specific algorithm for this code but my L and U are coming out as single digits, not matrix and I am not sure why/ how to do that (algorithm is attached as picture)
Hi Melissa, you have [r c] = size(A); n = length(r) but r is just a scalar that tells you the number of rows in A, so le...

casi 10 años hace | 0

Respondida
Is there a neat way (functions?) to plot 19 variables against each other?
Hello Casey, try the 'plotmatrix' command. If you do this as [S, Ax] = plotmatrix(datamatrix) then you will have to exp...

casi 10 años hace | 1

| aceptada

Respondida
How to make a curved line
Your I1 data is not sorted, so I1(end) - I1(1) is not the entire span. Also, if it were sorted, setting the spacing as half the...

casi 10 años hace | 0

Respondida
How can I get the frequencies of a signal converted from time domain to frequency domain via FFT command
If your frequency array runs from 0 to F, then F = 1/dt, where dt is the spacing between points in the time array. However, if ...

casi 10 años hace | 0

| aceptada

Respondida
Help on calculating cumulative moving average
movmean doesn't work because it uses a fixed window width and yours increases as you go. The command B = cumsum(A) will give yo...

casi 10 años hace | 0

Respondida
Fourier Transform changes when resolution changes
I believe that all of the plots are correct. For an N-point fft, if dx and dQ are the spacings of the x and Q arrays (Q being '...

casi 10 años hace | 0

Respondida
How to get the number of logical cores - parallel computing toolbox
Hi Miles, One way would be to use 'evalc', which is like 'eval' but can redirect command window output. You need to double u...

casi 10 años hace | 3

| aceptada

Respondida
Surface plot ignores points when using log scale
Hi Daniel, You are of course going to get some infs in your log plot since log(0) = -inf. Take a look at x = 1:10; y =...

casi 10 años hace | 0

| aceptada

Respondida
How to read values every number of rows in one column?
Rayed, You are very well set up in this situation. One of the best ways to do this is, if you check out the 'reshape' command,...

casi 10 años hace | 1

| aceptada

Respondida
Can someone help me understand the following cryptography script (Hill cipher technique)
Maybe I shouldn't answer for (instead of) Cleve Moler, but the basic idea is that if you go to http://www.ascii-code.com/ you wi...

casi 10 años hace | 1

| aceptada

Respondida
Why does quad work when integral does not?
Hi Stephen, You are missing a very important dot in your definition of G_norm. If you replace / with ./ then both meth...

casi 10 años hace | 1

Respondida
Multiple filters without built in functions
One possible reason is that R is about 1 kohm and C is about 300pF. This gives you an RC time constant of about .3 usec and a b...

casi 10 años hace | 0

Respondida
FFT of a simple harmonic data
Your signal has a large offset of -2, with some small oscillations about that value. Therefore your plot has a large peak at ze...

casi 10 años hace | 0

Respondida
Need help with solving partial derivative equation
try: doc meshgrid for an example that is very similar to what you are looking to do.

casi 10 años hace | 0

| aceptada

Respondida
How to extract vertices from a matrix.
Suppose you create an index vector ind = [1 2 2 3 3 1] which is the same as your column index for A in your original po...

casi 10 años hace | 0

| aceptada

Respondida
Trying to take FFT in frequency domain of spatial signal
Hi Brian You can see from the plot of x vs EZ that EZ has oscillations of wavelength order .01, so you should be getting k va...

casi 10 años hace | 0

| aceptada

Respondida
Plot using array for different plot lines?
A vectorized Matlab technique is to use meshgrid: [xx rr] = meshgrid(x,r) this makes two matrices each of size { length(...

casi 10 años hace | 1

| aceptada

Respondida
Phase of Fourier Transformed Signal for increasing Zero-Padding values
I believe this is related to the fact that when you pad the signal, you are effectively translating it to the left in the time a...

casi 10 años hace | 0

Respondida
Scaling issues when using IFFT to convert frequency signal to time signal
It's commendable that you're verifying that the energies of the time and frequency arrays are equal. A lot of people wouldn't b...

casi 10 años hace | 0

Resuelto


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

casi 10 años hace

Resuelto


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

casi 10 años hace

Resuelto


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

casi 10 años hace

Resuelto


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

casi 10 años hace

Resuelto


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

casi 10 años hace

Resuelto


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

casi 10 años hace

Resuelto


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

casi 10 años hace

Cargar más