Community Profile # the cyclist

### No strings on me

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

Programming Languages:
Python
Spoken Languages:
English

#### Statistics

All
• • • • • • • • • • • • #### Content Feed

View by

Is there a way to set the color tag attribute in macOS with MATLAB?
Yes, it is possible. Here is the github repo of a command line tool that will manipulate tags. You can call that command line ...

alrededor de 6 horas ago | 1

| accepted

How can I get data from evaluating a function, say y=x^2+5 and put it in table?
x = linspace(0.1,0.9,50); y = x.^2+5; tbl = table(y.');

alrededor de 10 horas ago | 1

| accepted

Linear regression fit model for Multi-variant responses
I think you need mvregress.

1 día ago | 0

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

2 días 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...

2 días 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.

3 días 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...

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

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

4 días ago | 1

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

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

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

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

6 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 = @...

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

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

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

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

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

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

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

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

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

8 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

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

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

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

9 días ago | 0

Solved

The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.] Bonus though...

9 días ago

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

9 días ago | 1

| accepted