Top 5% contributor
I have created a new (suitable for my needs) data type as a class. I want to use variables of this class in other functions that...
Asked 1 year ago
I know this is an old post but I'll reply anyway First of all, I agree with that you need to fftshift back before you take the ...
2 years ago
From what you say, I understand that you want to decrease the df of your spectrum. You know that df = 1/(N dt), ...
Answered 4 years ago
Both functions calculate the Lomb-Scargle periodogram (aka Gauss-Vanicek/Least-squares spectrum)
6 years ago
5 years ago
Calculates FresnelC, FresnelS integrals and their variations (C_1, C_2 and S_1 and S_2)
This function generates random numbers distributed according to the Laplace distribution
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...
1 year ago
Given a vector, v, return a new vector , vNew, containing only values > n.
v=[1 2 3 4 5 6]
x = [2 6 4 9 -10 3 1 5 -10]
then the output should be 9, because last minimum value (-10) lies at the 9th position.
Given n, you should return an n-by-n unit matrix.
If input is n=2 then
A = [ 1 0
0 1 ]
If input ...
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists.
x = [2 6 4 9 -10 3 1 5 -10];
For a given input vector, return the value that is furthest from zero.
For example, if
x = [1 2 -12]
* Given an integer number you have to return the number of its digits.
* For example 248 has 3 digits and 1589 has 4 digits
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN.
Given a and b, return the sum a+b in c.
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
Finds actual zero (or any other value) "actual" crossings
7 years ago
4 years ago
One way to do it is fid = fopen('filename.txt','r'); i=0; while ~feof(fid), end fclose(fid); I am sure there are more elega...
6 years ago
This is utility to read SAC (Seismic Analysis Code) binary files created on/for SUN platform.
12 years ago
Join the conversation