Community Profile

photo

the cyclist


Last seen: Today
4.584 total contributions since 2011

Data scientist at Cohen Veterans Bioscience; 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.)

Contact

the cyclist's Badges

  • Scavenger Finisher
  • Master
  • Thankful Level 4
  • 36 Month Streak
  • Likeable
  • Famous
  • Quiz Master
  • First Review
  • First Submission
  • Revival Level 3
  • Knowledgeable Level 4
  • First Answer
  • Puzzler
  • Speed Demon
  • Creator

View all

Contributions in
View by

Answered
Is there a way to shift the data upwards automatically?
I tried plotting Height vs. Temperature, since that is what your plot shows. But my graph looks completely different from yours....

alrededor de 12 horas ago | 0

Answered
How to remove certain rows of data in a cell array using logical indexing?
Here is an example where I keep only rows of each matrix where the sum is greater than 1. Perhaps you can adapt it to your speci...

1 día ago | 0

| accepted

Answered
string for figure title ignores text after variable
Write it as one string, with the variable in the midst of it" t = 8.2; titlestr=sprintf('Time=%6.5f sec',t(1)); title(titles...

5 días ago | 0

| accepted

Answered
random selection of number among 2 numbers
Here are a couple ways: 2*randi([0 1]) 2*round(rand())

5 días ago | 1

Answered
How can I get un-descend index of latent in pca function
My answer to this question gives a detailed explanation of how to use MATLAB's pca function, including how to reduce the number ...

6 días ago | 1

| accepted

Answered
Feature vector dimension reduction (PCA)
I have written an answer to this question that explains in detail how to use MATLAB's pca function, including how to do dimensio...

6 días ago | 0

| accepted

Answered
Error using vertcat Dimensions of arrays being concatenated are not consistent.
data3 = [data1 data2] will concatenate them horizontally rather than vertically. You can do that, because they have the same nu...

9 días ago | 0

| accepted

Answered
build an array y depending on x
You have a few problems to fix: As you can see in its documentation, the input function requires you to include some prompting ...

10 días ago | 0

Answered
Unique numbers, not ordered
I believe this does what you want: X1 = [1 23 36 45 47 2]'; X2 = [1 36 47 2 6 ]'; X3 = [1 22 23 47 2 4]'; ...

11 días ago | 0

Answered
Input from PCA to train in SVM
I have written a "tutorial" on how to use and interpret MATLAB's pca function here. Lots of users have asked questions (some of ...

12 días ago | 0

| accepted

Answered
Assign a label to a point of a matrix in if statement
By default, Kappa_j is going to be a numeric array, and there cannot accept character input. Instead, you could define it as a c...

13 días ago | 1

| accepted

Answered
Subtraction of set value from specific elements in column once criteria met
threshold = 5000; % Set this to the limit value you want x(x>threshold) = x(x>threshold) - 65535;

15 días ago | 0

| accepted

Answered
calling script in another script
This question and answer should help you.

16 días ago | 0

Answered
Binary Logistic Regression - beginner
If you have the Statistics and Machine Learning Toolbox, you can use the fitglm function to fit a binomial logistic regression. ...

18 días ago | 0

| accepted

Answered
conversion double to array
If you want your 34x1 double to be in a single cell of a cell array, then ... inder = rand(34,1); inderCell1 = {inder} If you...

19 días ago | 0

| accepted

Answered
Reproduce a best-fit 4-parameter sigmoid
It is difficult when you say you have no idea. But, here are a few thoughts. If you have never used MATLAB at all, then you hav...

19 días ago | 0

Answered
the "taylor" function does not work for me (beginner)
In the assignment statement for T3, you capitalized "Taylor". MATLAB is case-sensitive, so you must use "taylor".

20 días ago | 2

Answered
Iterator goes infinite when changing step from 1 to 0.1
It's difficult to follow exactly what it going on in your code. I haven't traced the logic completely, but I figured out that wh...

20 días ago | 0

| accepted

Answered
Shorten the values from a column in another column.
The specific solution is potentially very dependent on ... the input format -- there are several way to read in Excel, leading ...

20 días ago | 0

| accepted

Answered
Operations with function handles / anonymous functions
Is this what you want? function1 = @(x) x(1)^2+5 function2 = @(x) 2*x(2) function12 = @(x) function1(x) + function2(x)

20 días ago | 1

| accepted

Answered
Shorten the values from a column in another column.
If these are numeric values, I think maybe you can do output_values = unique(floor(input_values)); But see my comment above, f...

21 días ago | 0

Answered
Covariance matrix as a diagonal matrix or not??????
I am definitely not an expert in this, but my guess is that these statements might only be strictly true for signals of infinite...

21 días ago | 0

Answered
summing columns based on certain interval
The best answer will depend on what specifically you want the output to be, and also how generalizable the solution needs to be....

21 días ago | 0

| accepted

Answered
How to delect the zero values in table
If all of the table entries are numeric, then this will work: % Create an example input table x = [0; 1; 0; 2]; y = [0; 1; 0;...

21 días ago | 0

| accepted

Answered
Exponent error calculating integral.
I expect you want phi.^3 instead of phi^3 inside your function fun

21 días ago | 0

Answered
How to generate a sparse matrix for a given array?
Here is one way: A = [1 3; 1 4; 2 3; 2 5; 3 5; 4 5]; d = max(A(:)); B = sparse(A(:,1),A(:,2...

22 días ago | 1

Answered
Assign rank to values in a matrix
Here is one way. (I did a smaller array, so the result is easier to verify.) % Set random seed for reproducibility rng default...

22 días ago | 1

| accepted

Answered
use mvnrnd with some conditions
Let's take this small example in which we generate just 3 pairs of correlated random numbers: n=3; % Generate 3 pairs, instead ...

25 días ago | 0

Answered
change variable in function_handle
I think this is what you mean? % Define f f=@(x) sin(x); % Derive g from f g = @(x) f(x+2); % Show that it gives expected r...

26 días ago | 0

| accepted

Answered
How to change legends' name
Here is a basic way you can do it: N = 3; figure hold on for ii = 1:N plot(rand(1,7),'DisplayName',sprintf('Theta %d'...

27 días ago | 0

| accepted

Load more