# the cyclist

### No strings on me

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

**Programming Languages:**

Python

**Spoken Languages:**

English

**Statistics**

RANK**15**

of 242.977

REPUTATION**12.774**

CONTRIBUTIONS

**37** Questions

**4.371** Answers

ANSWER ACCEPTANCE **
75.68%
**

VOTES RECEIVED**2.391**

RANK**9.192** of 16.987

REPUTATION**57**

AVERAGE RATING**0.00**

CONTRIBUTIONS**1** File

DOWNLOADS **1**

ALL TIME DOWNLOADS**572**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Plotting data against time

New answer based on your update. The problem is that your original time series is in two different formats -- not including the...

1 día ago | 0

| accepted

Plotting data against time

Works for me, when I correctly specify valid dates using the input format. I'm guessing that your datetime is somehow messed up...

1 día ago | 0

How do I display multiple num2str in a single row

I expect you'd be much better off using sprintf to format your output.

1 día ago | 0

Why am I receiving the error "Array indices must be positive integers or logical values."?

Here is a completely different tack, that I think is less confusing because you just defining the function I(z) more naturally a...

2 días ago | 0

| accepted

How can I make an exponential fit using two points of my data.

You can use the 'Weights' Name-Value pair, and heavily weight the first point. Here is a made-up example. Notice how f2 passes t...

2 días ago | 0

| accepted

Why am I receiving the error "Array indices must be positive integers or logical values."?

You have at least two problems with your code. First, you need an explicit multiplication sign in these lines: I(i) = I0*sin(k*...

3 días ago | 1

Shaded Standard Deviation Corridors

It's because the last three values of x and y are NaN. dataset=xlsread('Book1.xlsx', 'Sheet1'); tensile_stress = dataset(:,1);...

3 días ago | 1

Visualize a vector field function with matlab

x = -3 : 0.5 : 3; y = -3 : 0.5 : 3; z = -3 : 0.5 : 3; [xx,yy,zz] = meshgrid(x,y,z); Fx = xx.*zz; Fy = xx.*yy; Fz =...

4 días ago | 1

| accepted

hold on option is not working in the present code

The problem doesn't really have anything to do with the legend. The fundamental problem is that you first define L as a paramete...

5 días ago | 0

| accepted

delete specific rows in a table

I believe this does what you want. Note that this file doesn't have any repeated integer times. So, you don't need the second st...

5 días ago | 0

| accepted

How to access the equation above the while loop

One straightforward way to do this is by using an anonymous function: % Define an anonymous function for the limit f_limit = @...

5 días ago | 1

| accepted

Trying to make a code that tells the weather

You should be able to access a weather API (e.g. this free one), using the webread function.

6 días ago | 0

legend NumColumns not working in 2018a

It looks to me that the documentation states the change was in R2018b, not R2018a. As you can see, that code works fine here (R...

6 días ago | 0

| accepted

How to plot like the following figure?

I recommend looking at the MATLAB Plot Gallery, finding a figure that is close to what you need, and pulling the code from there...

6 días ago | 0

Transfering any point in PC space to original space

Borrowing the first few lines of code from my PCA tutorial ... rng 'default' M = 7; % Number of observations N = 5; % Number ...

6 días ago | 1

| accepted

How can I find the average of several lines whose datasets are different lengths?

One possible solution would be to interpolate (e.g. with spline function) using the interp1 function, to a common grid of points...

6 días ago | 0

Why do I receive "Index exceeds the number of array elements (1)" ?

m is a scalar -- the length of the vector x, plus one. You try to index into it as if it is a vector, for example in the expres...

7 días ago | 0

| accepted

Normalize unit vector to single didgit integers

Does the following do what you want? f = @(t) round(t/abs(min(t))); f([ 0.4 -0.4 0.8]) f([ 0.123 0.123 .5]) It gives a dif...

7 días ago | 0

VPA error Index exceeds number of array elements

I'm confused, because the code you posted runs fine: syms t P(t)= 30/(3+7*exp((-.03*t))) P(1960) vpa(P(1960)) Is it possibl...

7 días ago | 0

How can I solve this error?

When defining a function using that syntax, it has to appear inside a file, for example a text file with the name GRxx_P8_E1.m ...

7 días ago | 0

| accepted

How to plot binary matrix as dots?

M = magic(7); B = M > mean(M); colormap('gray') imagesc(B) axis square

7 días ago | 0

Interpolation of (multidimensional) array

So, this is a somewhat strange "interpolation" (and extrapolation) problem. It requires certain assumptions to leap from your da...

7 días ago | 0

| accepted

multiplication of empty 0X0 double and scalar (1X1)

One possible solution is to use a try-catch structure. The "try" block will be the code that is generally executed, but if that ...

8 días ago | 0

| accepted

operations on two different matrices

Suppose ... m = 3; n = 4; A = magic(m) B = magic(n) The first row of A is a 1x3 row vector, and the first row of B is a 1...

8 días ago | 0

How to find correlations between a vector and a 3D array and plot the correlations spatially?

Is it correct that the result will be a 120x120 array of correlations, where each entry is the correlation of the 50 isotope val...

8 días ago | 1

| accepted

How to randomly change element of matrix?

I'll illustrate for an nxn where n = 3, and repeat 2 times: % Set the random number generator seed, for repeatability here rng...

8 días ago | 1

| accepted

I want to remove the blank space between the first two bars and the last two bars. Can anyone help please?

Instead of using the dates in x1 to define the bar positions along the X axis, you could use h1=bar(M1); % instead of h1=bar(x1...

8 días ago | 0

| accepted

Matlab only calculates values for only certain inputs in a matrix.

Several thoughts: First When you write convof = 1/x you need to realize that x is a vector. I think you intended for i=1:10...

9 días ago | 0

stop execution of code to check results

One way would be to use the debugger, specifically a conditional breakpoint.

11 días ago | 0

How to know which distribution is BCa method form bootci assuming my data follows

I don't have a definitive answer, but looking inside the code of bootci.m (by using edit bootci), I see enough usage of norminv ...

11 días ago | 0