Community Profile

photo

the cyclist


Last seen: Today
4,148 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
Error in using rmoutliers()
Running this load FORCHECK.mat FFF = rmoutliers(FORCHECK,'percentiles',[0 90]); worked just fine for me. Maybe just restar...

1 day ago | 1

Answered
Creating a matrix from spaced out lines of another matrix
Here is a function definition. Put it in a file named smallFromBig.m. function [xyzSmall] = smallFromBig(x,y,xyzBig) ...

1 day ago | 0

| accepted

Answered
How to obtain eigenvalues as functions of a variable?
Take a look at John D'Errico's eigenshuffle function in the File Exchange. I believe it does what you want (and there is some th...

2 days ago | 0

| accepted

Answered
Plotting a function with two terms or alternatively a curve of best fit to a histogram
If you have all of the x values, then you should be able to fit using the fitgmdist function, which will find the best fit to mu...

2 days ago | 1

Answered
Converting input matrix A with size 4x3 into B matrix with size 12x3 with coordinates in matrix A
Here is a somewhat slick way: [m,n] = size(A); AA = A'; B = [repelem(1:m,n)' mod(0:m*n-1,n)'+1 AA(:)]; This is fine if one...

2 days ago | 0

Answered
Converting input matrix A with size 4x3 into B matrix with size 12x3 with coordinates in matrix A
There are some slicker ways to do this, but it might be instructive for you to see how to do this with a simple for loop: [m,n]...

2 days ago | 0

| accepted

Answered
determining linear independence among two vectors using least square method
If you have the Statistics and Machine Learning Toolbox, then you can use the fitlm function.

2 days ago | 0

Answered
determining linear independence among two vectors using least square method
If your two vectors are v1 and v2, then you could use the corrcoef function to calculate the correlation coefficient and its p-v...

2 days ago | 0

Answered
Find indexes according to a value in array
Dare I say obviously, A can't obey both the conditions simultaneously. You need to find the indices separately. [find(A<=x,1,'l...

4 days ago | 0

| accepted

Answered
error while using Operands
Here's what is means: true && true; % This works, and gives a scalar result [true true] && [true false]; % This gives the er...

4 days ago | 0

Answered
How to correct matrix dimension disagree error
You are effectively trying to do this operation in your code: n * u where n is a 1x4 matrix, and u is a 1x100 matrix. That wo...

5 days ago | 0

Answered
Select specific cells from a cell array and create a seperate vector
Does your cell array have only numeric values in it? If yes, then maxVal = max(cell2num(C),[],3) where C is your cell array.

5 days ago | 0

| accepted

Answered
How to create a plot of the spread of the data
Does using subplots help show your point better? % Load the data load Data1.mat % Convert from table to numeric Data = tab...

5 days ago | 0

Solved


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

5 days ago

Answered
set default line marker symbol
See this answer from Mathworks support.

6 days ago | 1

| accepted

Answered
how to find the Reverse process of A(B).
C = [9 4 2 1 7 6 8 5 3 8 11]; A(B) = C

6 days ago | 1

Answered
How do I find the column of maximum values of a maxtrix?
Here is one way to do it. [~,linearIndex] = max(x,[],'all','linear'); % First, find the *linear* index of x [rowIndex,colIndex...

7 days ago | 0

Answered
Area of an closed 2d plot
The polyarea function.

7 days ago | 0

Answered
How can I do polynomial fitting when X-axis is time
Hm. Plotting the data you posted, using the seconds function, results in exactly what I would expect -- including capturing the ...

7 days ago | 0

Answered
Get the diagonal without calculating the explicit matrix
Here is one way: % Make up some inputs N = 4; B = rand(N); C = rand(N); % Calculate the diagonal A_diag = 0; for nr = 1...

8 days ago | 1

Answered
Find the sum of the vector using a for loop
If you type the expression 50:1 into MATLAB, you will get the result >> 50:1 ans = 1×0 empty double row vector So, y...

8 days ago | 0

Answered
Index exceeds the number of array elements (1)
You didn't answer Ameer's first question, but it seems clear that when you call the function diggerangle(L_12, L_23, L_13, x) %...

8 days ago | 1

Answered
How to write a custom non linear function for data fitting?
I don't have the Curve Fitting Toolbox, so I can't really comment on your current code. But, if you also have the Statistics and...

10 days ago | 1

Answered
Plot and fit exponential decay probability of population
You are correct to use the ecdf function. I think the piece you are missing is the use of the 'censoring' input. Take a look at ...

10 days ago | 0

| accepted

Answered
matlab gives wrong answer to determinant of a 3x3 matrix
MATLAB gives the correct result to within the limits of double-precision floating-point arithmetic. This is a very common quest...

11 days ago | 1

Answered
How do I print unknown values
vectorA = [2 3 5 7]; ['Vector A is: [',sprintf('%6.3f', vectorA),']']

12 days ago | 0

| accepted

Answered
How to fit multiple peaks using Gaussian funtion
Never this the original of this question, but saw the comment. If you have the Statistics and Machine Learning Toolbox, I belie...

12 days ago | 0

Answered
Hyerbolic Functions causing issues with Contour Plots.
I ran the following code k = 0.5; l = 0.5; k1=((k+(1/2))*pi)^4; l1=((l+(1/2))*pi)^4; v1 = @(x,y) cos(k1*x)-cosh(k1*x)-(...

12 days ago | 0

Answered
make rectangular with vectors
You say that you have a problem with "one" of your lines, but I think you have a deeper conceptual problem with how you tried to...

13 days ago | 1

| accepted

Answered
what is wrong with my code, i am trying to plot below
FYI, there is a much more efficient solution, which is to avoid the for loop altogether: t = 1:.01:10; x = zeros(size(t)); ...

13 days ago | 0

Load more