Community Profile

photo

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
  • Treasure Hunt Participant
  • Scavenger Finisher
  • Master
  • Thankful Level 4
  • Likeable
  • Famous
  • First Review
  • First Submission
  • 36 Month Streak
  • Revival Level 3
  • Knowledgeable Level 4
  • First Answer

View badges

Content Feed

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

circa un'ora ago | 0

Answered
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 giorno ago | 0

| accepted

Answered
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 giorno ago | 0

Answered
How do I display multiple num2str in a single row
I expect you'd be much better off using sprintf to format your output.

2 giorni ago | 0

Answered
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 giorni ago | 0

| accepted

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

3 giorni ago | 0

| accepted

Answered
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 giorni ago | 1

Answered
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 giorni ago | 1

Answered
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 giorni ago | 1

| accepted

Answered
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 giorni ago | 0

| accepted

Answered
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 giorni ago | 0

| accepted

Answered
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 giorni ago | 1

| accepted

Answered
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 giorni ago | 0

Answered
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 giorni ago | 0

| accepted

Answered
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 giorni ago | 0

Answered
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 giorni ago | 1

| accepted

Answered
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 giorni ago | 0

Answered
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 giorni ago | 0

| accepted

Answered
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 giorni ago | 0

Answered
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 giorni ago | 0

Answered
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 giorni ago | 0

| accepted

Answered
How to plot binary matrix as dots?
M = magic(7); B = M > mean(M); colormap('gray') imagesc(B) axis square

7 giorni ago | 0

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

8 giorni ago | 0

| accepted

Answered
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 giorni ago | 0

| accepted

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

8 giorni ago

Answered
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 giorni ago | 1

| accepted

Answered
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 giorni ago | 1

| accepted

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

9 giorni ago | 0

| accepted

Answered
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 giorni ago | 0

Load more