Community Profile

photo

the cyclist


Alden Scientific

Last seen: Today Active since 2011

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

All
  • Treasure Hunt Participant
  • Scavenger Finisher
  • Master
  • Thankful Level 5
  • Likeable
  • Famous
  • First Review
  • First Submission
  • 36 Month Streak
  • Revival Level 3
  • Knowledgeable Level 5
  • First Answer

View badges

Content Feed

Answered
Randsample with matrix: extract multiple values from every column of a matrix without loop!
Here is a pretty obfuscated one-liner, but I think it does what you want, and should be fast: % Your data z_k = 2; pV= [0.552...

ungefär 5 timmar ago | 0

Answered
use array operations to add 360 to elements of an array less than -180 without a loop
A = [1,2,3,359,5,358,355]; idx = (A>=180); A(idx) = A(idx) - 360

ungefär 17 timmar ago | 1

Answered
How to locate X value for a given Y value
It would be helpful if you uploaded the data. You can use the paper clip icon in the INSERT section of the toolbar. It seems li...

ungefär 20 timmar ago | 0

Answered
How to compare classifiers on different datasets?
I don't know that there is one best answer to this. I think that a useful way to think about it is to realize that what you rea...

en dag ago | 0

Answered
Unrecognized function or variable 'Newton_Starbucks'.
I searched the internet for "Newton_Starbucks". The only link I found was this one. If that's relevant, then it seems to me that...

en dag ago | 0

| accepted

Answered
How to break data in to groups using while loop?
Here is one way: matrix = [1 50 60 70 50 40 2 NaN 10 20 10 10 3 NaN 20 NaN NaN NaN 1 NaN 60 30 40 50 2 10 2...

2 dagar ago | 1

Answered
How to label the numeric values at the end of a stack in a stacked bar graph?
More of an editorial comment than just adding to the solid solutions that are already here, but I think a more economical (and m...

2 dagar ago | 1

Answered
help me to find error in this file?
The error seems to be that you are missing parentheses, or they are otherwise mismatched. We could guess at where they are missi...

3 dagar ago | 0

Answered
Use data array with specific names
You are seeing first-hand why variables should not be named dynamically. If at all possible, this problem should be solved upstr...

4 dagar ago | 0

Answered
Finding the first index of a row where all integers of a defined list have occurred
I 100% agree with @John D'Errico's take on this, which is that any non-loop solution here is (probably) going to be sufficiently...

6 dagar ago | 0

Answered
How can I plot this X and Y data?
It's unclear to me exactly what you want to plot. That file has 10,048 data points. Here is one possibility, which puts a dot a...

6 dagar ago | 1

Answered
Way to solve AX=XB
This is a special case of the Sylvester equation. Looks like the sylvester function will be helpful for you. You might also be...

8 dagar ago | 0

Answered
linear mixed-effects model (fitlme) add array variable
I am by no means an expert on image processing, but one possibility is to preprocess your images to extract individual "features...

8 dagar ago | 0

Answered
post hoc tests for aoctool
After running aoctool and getting the stats output, you can simply run [results,~,~,gnames] = multcompare(stats) If you do tha...

9 dagar ago | 1

| accepted

Answered
Mat structure to csv
I downloaded the first file on that page, which is EXIOBASE_3rx_aggLandUseExtensions_1995_pxp.mat, and then uploaded it to MATLA...

9 dagar ago | 0

| accepted

Answered
Randomly select one value from an Array.
Here is one way to pull 30 random values (with possible repeats) from A. randomIndex = randi(200,30,1); new_A = A(randomIndex)...

9 dagar ago | 0

Answered
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-120.
You haven't quite given us enough information about your code, because that little code snippet may or may not work, depending o...

9 dagar ago | 0

Answered
0.48 and 0.72 not detected in the array
Due to floating point precision, the values are not exactly 0.48. For example, load("varmat.mat","SessionData") SessionData.Co...

10 dagar ago | 1

Answered
What are the differences between integral and trapz?
Both functions perform numerical integration, but they use different methods. This is mentioned within the first couple of the d...

11 dagar ago | 2

Answered
how to split a dataset for training and testing in matlab?
randsample, cvpartition, and randperm can all be useful for creating training/test splits. As @Sargondjani mentions, we need mor...

11 dagar ago | 0

| accepted

Answered
run takes too long!
Vectorizing the for loop gives a nice speedup. There are almost certainly other optimizations possible. clc clear; % percent ...

12 dagar ago | 1

Answered
How to quantify the goodness of a fit?
EDIT: My first posting on this was incomplete, so I radically edited it. Sorry for any confusion if you saw the first version. ...

13 dagar ago | 0

| accepted

Answered
take the length of each row
There are probably a few ways to do this. Here is one, which relies on reading the file into a numeric array, which will pad the...

14 dagar ago | 0

Answered
How to create a vector that repeats 5 values per increment in a for loop?
v = 100:50:1000; u = repelem(v,5);

14 dagar ago | 0

Answered
Plot question as values for both axis are different
Do you mean you just want to place two plot on the same axes? Then you use hold figure hold on plot([2 3 5],[7 11 13]) plot(...

17 dagar ago | 0

Answered
Generate a random sequence of PAM-4 but with values -1,-0.33,0.33,1
I didn't research PAM-4 enough to know whether each element is independent from prior values. The following code will generate a...

18 dagar ago | 0

Answered
It is possible to use sprintf to print a string input?
I think you want c1= sprintf('Indicate the units of the variable %s',vi); rather than c1= sprintf('Indicate the units of the ...

18 dagar ago | 0

| accepted

Answered
Connecting to ChatGPT using API
Did you try following the instructions in the error message, and use Name-Value pair 'MediaType','application/x-www-form-urlenc...

18 dagar ago | 0

Answered
Counting sequences for a non-parametric statistical test (sequence test or RUN test).
I see you found and accepted a solution. An alternative would have been to download the versatile RunLength utility from the Fil...

18 dagar ago | 1

Answered
Array indices must be positive integers or logical values
I'm guessing that when you wrote B(L - x) (in two places), you intended this multiplication: B.*(L - x) instead. The way you...

19 dagar ago | 1

Load more