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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 1

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

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

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 0

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

Beantwortet
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 '...

fast 10 Jahre vor | 0

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

fast 10 Jahre vor | 3

| akzeptiert

Beantwortet
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 =...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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,...

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 1

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

fast 10 Jahre vor | 0

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

fast 10 Jahre vor | 0

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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(...

fast 10 Jahre vor | 1

| akzeptiert

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

fast 10 Jahre vor | 0

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

fast 10 Jahre vor | 0

Gelöst


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:/...

fast 10 Jahre vor

Gelöst


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.

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Mehr laden