You must specify 'Replace',false, for example, If the sample is small enough toįit in memory, then you can apply plotting and fitting functions that do not directlyĭatasample supports sampling only along the first dimension ofįor tall arrays, datasample does not support sampling with Sampling a large data set preserves trends in theĭata without requiring the use of all the data points. Set the Replace name-value pair argument to false to sample without replacement.ĭatasample is useful as a precursor to plotting and fitting a ![]() When the sample is taken with replacement (default), y can contain repeated observations from data. ![]() For example, y = datasample(,2) can return y = NaN 14. If the input data contains missing observations that are represented as NaN values, datasample samples from the entire input, including the NaN values. Or, if dim = 2, then y is a dataset array containing k variables selected from data. If data is a dataset array and dim = 1, then y is a dataset array containing k rows selected from data. Or, if dim = 2, then y is a table containing k variables selected from data. If data is a table and dim = 1, then y is a table containing k rows selected from data. ![]() Or, if you specify a value for the dim name-value pair argument, datasample samples along the dimension dim. If data is an N-dimensional array and dim = 1, then y is an N-dimensional array of samples taken along the first nonsingleton dimension of data. Or, if dim = 2, then y is a matrix containing k columns selected from data. If data is a matrix and dim = 1, then y is a matrix containing k rows selected from data. If data is a vector, then y is a vector containing k elements selected from data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |