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

9 years ago | 1

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

9 years ago | 0

| accepted

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

9 years ago | 0

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

9 years ago | 1

| accepted

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

9 years ago | 0

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

9 years ago | 0

| accepted

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

9 years ago | 0

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

9 years ago | 0

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

9 years ago | 3

| accepted

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

9 years ago | 0

| accepted

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

9 years ago | 1

| accepted

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

9 years ago | 1

| accepted

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

9 years ago | 1

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

9 years ago | 0

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

9 years ago | 0

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

9 years ago | 0

| accepted

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

9 years ago | 0

| accepted

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

9 years ago | 0

| accepted

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

9 years ago | 1

| accepted

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

9 years ago | 0

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

9 years ago | 0

Solved


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

9 years ago

Solved


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.

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


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

9 years ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

9 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

9 years ago

Load more