# the cyclist

### Alden Scientific

Head of Modeling and Statistics at Alden Scientific. Obsessive runner. Professional Interests: Predictive modeling, statistics. (I don't respond to email via author page, but will usually look at a question if you send me a link to it.)

**Programming Languages:**

Python, R, MATLAB, SQL

**Spoken Languages:**

English

**Statistics**

RANK**15**

of 265,247

REPUTATION**13,743**

CONTRIBUTIONS

**41** Questions

**4,676** Answers

ANSWER ACCEPTANCE **
73.17%
**

VOTES RECEIVED**2,596**

RANK**9,613** of 18,127

REPUTATION**57**

AVERAGE RATING**0.00**

CONTRIBUTIONS**1** File

DOWNLOADS **2**

ALL TIME DOWNLOADS**574**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Error with clusterDBSCAN.discoverClusters

Do you have the Radar Toolbox installed?

1 day ago | 0

| accepted

How to save workspace in stages while optimizing disk space

The save command has a syntax option that allows you to specify a list of variables to save, rather than saving all variables in...

3 days ago | 0

I used PCA on 9-D data. I want to plot PCs direction

Your comment was helpful. I think the biplot function may do what you need. The biplot illustrates what the original axes look ...

3 days ago | 0

Linear mixed effects model standardization with Z score not giving consistent results

I'm not sure why you expect the model to be unchanged (or what specific aspects of the model you expect to be unchanged). Even ...

4 days ago | 0

| accepted

How to combine cell arrays with different dimensions?

Here is one way: % Simplified version of your data C = {rand(2,1), rand(3,1); rand(5,1), rand(7,1)}; % Concatenate th...

4 days ago | 0

| accepted

Performing Chi Square Test

The crosstab function calculates the table from raw data. It does not expect the table itself as input. After an admittedly bri...

7 days ago | 0

Is there a Matlab function to convert a plot into a matrix or image?

I assume you mean that you want to do it programatically, as opposed to interactively. I'm a creature of habit, and I generally...

8 days ago | 0

| accepted

How to calculate the minimum distance between two points?

I am not absolutely certain that this code is equivalent to what you wrote, because I cannot test it on my local machine. (I do ...

10 days ago | 0

K-means clustering output matrix C (represent centroid locations)

You have 8 centroids, each of which is a point in a 10-dimensional space. Each row gives the 10 coordinates needed to locate tha...

10 days ago | 0

| accepted

How to calculate the minimum distance between two points?

I doubt that this is the main issue slowing down the code, but you should preallocate the memory for your output array. Growing ...

10 days ago | 0

Adding multiple variable contents in a single variable

If your data are already stored in dynamically named variables, then I think your only recourse is to use eval to do this task: ...

13 days ago | 1

| accepted

simple regression analysis issue

The method you used does not include an intercept, so your fit is forced to go through the origin. Try this instead (which is al...

16 days ago | 0

| accepted

Reshape matrix with averages of 4 elements in each row

Here is one way: n = 4; A = [ 0 2 2 4 0 6 4 6 1 1 2 8 0 0 4 0 9 9 2 8 0 0 0 8]; tmp = movmean(A,[0 n-1],2); B ...

20 days ago | 0

Why scatterplot shows one point in different color and rest all the points are different?

If I have interpreted your code correctly, you have plotted the x-y data, just in different groups. Your figure actually has fou...

20 days ago | 0

Problems clustering with kmeans

I think you might have success if you try the DBSCAN algorithm instead.

1 month ago | 0

| accepted

Question

Write file(s) with all properties of a MATLAB model

Suppose I have built a machine learning model in MATLAB. It has a list of properties (and underlying property data) that encapsu...

1 month ago | 1 answer | 0

### 1

answeri have one dimensional array and i want to move every non zero element oh that array to exchange position with every zero in each iteration.

I think this does what you want: % Input data a = [1 2 3 4 0 0 0]; % Find the indices of the non-zeros and the zeros idxNo...

1 month ago | 0

Finding values with the same index in two arrays

RowCol1 = [17.487504; 17.487591; 17.487596; 17.487605; 17.487617]; RowCol2 = [16.113; 16.116; 16.244; 17.487591; 17.487596; 17...

1 month ago | 0

| accepted

Selecting Specific Elements in a Matrix Using Group

Height = [62; 65; 63; 70; 58; 70; 73]; Gender = [1; 1; 1; 2; 1; 2; 2]; % where 1 is female and 2 is male data_table = [Height(...

1 month ago | 1

| accepted

how can I classify the loads based on Bagging decision trees and compare it with actual data?

I have not gone through your whole code, but I loaded your MAT file and then ran C = confusionchart(Actualdata.Loads,Preddata.L...

1 month ago | 0

| accepted

I want to get the difference between the present number and the previous number for 1000 set of data from the plot.

a = [2 3 5 7 11]; a - a' % All possible differences between pairs of elements of a

1 month ago | 1

How can I create a 16 round for loop in this problem?

Use a cell array to store the values: for k = 1:16 Key{k} = randi([0,1],[1,4]); In{k} = randi([0,1],[1,4]); Cip...

1 month ago | 0

Problem with index in position 1 exceeding array bounds in PSO algorithm

x_min and x_max are 1x2 vectors, but in the loop you try to access a second row of those matrices, which do not exist. I'm not ...

1 month ago | 0

请问怎么让具有两列元素的矩阵按照行之和的大小顺序排列？。

A=[1,2; 6,4; 2,7]; [~,sortingIndex] = sort(sum(A,2)); output = A(sortingIndex,:)

1 month ago | 0

Intersect() with with repetition

I frankly have not quite figured out the logic of what you want as output, but I'm pretty sure that you can construct what you w...

2 months ago | 0

two for loops in parallel

If I understand you correctly, you don't need two for loops, and this will do what you want M=5; x=0; A=[1 4 7 10 13 16 19]; ...

2 months ago | 0

| accepted

24 Hours for run my for loop

Without seeing your code, it is impossible to know specifically what are possible approaches to speed it up, but two possibiliti...

2 months ago | 0

| accepted

How can i interpolate 1-D data, whit y especified values?

Unless I'm missing something, it sounds like you just want to interpolate x from y, instead of y from x: x = [1 2 3]; y = [1 4...

2 months ago | 0

| accepted

Hello everyone, I want to restrict the domain of a vector to return it to a smaller data set. For example, X between 2 and 7

X = [ 1 2 3 4 5 6 7 8 9 10 ]; idxToKeep = (X>=2) & (X<=7); Xkeep = X(idxToKeep) You can also do it all in one...

2 months ago | 0