Community Profile

# the cyclist

Last seen: Today Active since 2011

Obsessive runner. Flâneur. 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.)

All

#### Content Feed

View by

how do I find at which sample on the x-axis I have maximum value of y-axis?
If you use the two-output syntax for the max() function, the second output is the index of the maximum: clear all clc set(0,'...

etwa 3 Stunden ago | 0

| accepted

How to plot successive rows of a table when value is true
This line of code for ii=1:ra-1 is looping over all rows except for the last one, so it never "sees" the last row. Therefore, ...

ein Tag ago | 0

| accepted

How to create bar graph with portions (multi-dimensional)?
This example from the documentation shows exactly how to do it. y = [2 2 3; 2 5 6; 2 8 9; 2 11 12]; ba...

3 Tage ago | 0

How to obtain confidence level and coefficient of determination?
tsreg is not a MathWorks function. Are you using this code from the File Exchange? Obviously, the author of that code has not p...

16 Tage ago | 0

| accepted

Inverse of a cell array
Do you mean you want the reciprocal of each element of each matrix? (That is not what the inverse of a matrix means.) If so, th...

17 Tage ago | 1

| accepted

How to rearrenge function with inputs given?
Option 1 You could do something that is GUI-driven, where the user enters values into textboxes that you have labeled as accel...

17 Tage ago | 0

could anyone help me how to generate some of the similar values using rng
Here is a new answer, based on the comments on the other answers. numberTotal = 8; % You can change this to 1000 numberRepeat...

17 Tage ago | 0

| accepted

could anyone help me how to generate some of the similar values using rng
In response to the comment in my other answer, here is a pretty simple way to do it: numberRep = 3; % You can change this to 80...

18 Tage ago | 0

could anyone help me how to generate some of the similar values using rng
Is this what you mean? rng default % for reproducibility, if desired [repmat(rand(),1,3) rand(1,2)]

18 Tage ago | 0

New variables after computing Principal Components Analysis
Yes, the output score is the observed values of the variables in the principal coordinate axes. I wrote a detailed answer to th...

19 Tage ago | 0

| accepted

How do I integrate the triple integral square root of 4-x^2-y^2-z^2 from 0,1,0,1,0,1?
f = @(x,y,z) sqrt(4 - x.^2 - y.^2 - z.^2); q = integral3(f,0,1,0,1,0,1)

21 Tage ago | 0

Gaussian Curve Plotting Issues
Can you be more specific what you mean by "the current gaussian curve is very wrong"? Do you mean with the lines connecting all ...

22 Tage ago | 0

I need to calculate invers of a non square large symbolic matrix
Non-square matrices do not have inverses. You can calculate the pseudoinverse using pinv.

27 Tage ago | 0

Implementation of connected components analysis using matlab
Did you think to google "matlab connected components"? Literally the first hit is this MATLAB function. I hope that helps.

28 Tage ago | 0

| accepted

Problem by using str2double with csv file
The issue is that your input file uses commas as the decimal separator, rather than a period ("decimal point"). This means that ...

29 Tage ago | 0

Having issues producing bar chart
I assume you got error from this line: xlabel(Animal ID''s') You have mismatched single quotes, i.e. "unbalanced delimiters", ...

etwa ein Monat ago | 0

| accepted

How to sort a cell array based on the first row?
Out of curiosity, is there some reason you are using a cell array rather than a numeric array to store these numeric data? % Or...

etwa ein Monat ago | 0

| accepted

How can a 4 element array index pull stored string values?
Can you upload examples of your variables fourElementVector and HexData, in a MAT file? This would be helpful. But it seems fro...

etwa ein Monat ago | 1

How to select all rows of a given column in a cell array
Your syntax: T{1}{:,4} would work if the contents of T{1} were also a cell array, since you would use the curly brackets to ac...

etwa ein Monat ago | 1

| accepted

Defining a fitline only up to a specific x-tick
It should be straightforward, but it is not possible to deduce from your code how to do it. In particular, since none of your va...

etwa ein Monat ago | 1

| accepted

how to make 3d array by stacking 2d arrays from sentinel 5p data?
You are looping over the wrong dimension in your code. You want something like this: files = dir('S5P_OFFL_L2__CH4____201901*.*...

etwa ein Monat ago | 0

| accepted

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

etwa ein Monat ago | 1

| accepted

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

etwa ein Monat ago | 0

| accepted

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

etwa ein Monat ago | 0

| accepted

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

etwa ein Monat ago | 1

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

etwa ein Monat ago | 1

| accepted

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

etwa ein Monat ago | 0

| accepted

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

etwa 2 Monate ago | 0

| accepted