Community Profile

# the cyclist

##### Last seen: Today
4.140 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.)

View all

Contributions in
View by

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...

circa 12 ore ago | 0

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...

circa 21 ore ago | 0

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...

2 giorni ago | 0

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.

2 giorni ago | 0

| accepted

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

2 giorni 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 ...

2 giorni ago

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

3 giorni ago | 1

| accepted

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

3 giorni ago | 1

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...

4 giorni ago | 0

Area of an closed 2d plot
The polyarea function.

4 giorni ago | 0

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 ...

4 giorni ago | 0

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...

4 giorni ago | 1

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...

5 giorni ago | 0

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) %...

5 giorni ago | 1

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...

7 giorni ago | 1

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 ...

7 giorni ago | 0

| accepted

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...

8 giorni ago | 1

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

8 giorni ago | 0

| accepted

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...

9 giorni ago | 0

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)-(...

9 giorni ago | 0

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...

10 giorni ago | 1

| accepted

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)); ...

10 giorni ago | 0

what is wrong with my code, i am trying to plot below
In every iteration of the for loop, you are simply overwriting x, over and over. Instead, you need to define a vector for x, to...

10 giorni ago | 0

| accepted

whats wrong with my code?
He wrote dx = [0]; and you wrote dx[0];

10 giorni ago | 1

| accepted

Problem with find string in array
contains(cellstr(Mfg),'bmw')

10 giorni ago | 1

Save image containing plotted lines
I would expect print('-dpng','-r600','HoughLines.png') to work. You could also try the export_fig utility from the File Excha...

11 giorni ago | 0

How to save any trained machine learning model to use it for prediction later?
The standard calling syntax, e.g. Mdl = fitrensemble(Tbl,ResponseVarName); stores everything you need in the model object name...

11 giorni ago | 0

| accepted

Perform inverse of each double within a cell
Why do you think you cannot use cellfun? Period = {[2 3; 5 7],[11 13]}; Frequency = cellfun(@(x)1./x,Period,'UniformOutput',...

12 giorni ago | 0

| accepted