Question

plot3: Time for one periodic orbit

If have x,y,z values as that form a periodic orbit (circle shape) when plotted is it possible to calculate the time it takes for...

20 days ago | 0 answers | 0

Question

Returning only positive values of a data set

If I a 3 row data set how would I return a new data set that only considers positive row 1 values for the first row so If Data...

20 days ago | 1 answer | 0

Question

Plotting points that pass through y for x,y,z coordinates

I have a Data file of 3 rows 20 columns with the first row being x, second being y, third being z Data=[0.345 0.343 0.341 0.339...

20 days ago | 1 answer | 0

Question

Using polyfit and polyval functions with data

I've been using the polyfit and polyval functions recently and I would like to approximate data between 2 vectors but I'm wonder...

27 days ago | 2 answers | 0

Question

Plotting missing data in different colour

Im trying to plot prices as dots and my guess price nan values as different coloured dots. If I have. years=[1;2;3;4;5;6;7;8;...

28 days ago | 1 answer | 0

Question

Boundary conditions Partial differential equations

I'm trying to set boundary conditions according to https://uk.mathworks.com/help/matlab/ref/pdepe.html I have boundary conditio...

30 days ago | 0 answers | 0

Question

Simulating Stochastic Differential equations

I am just learning about Stochastic differential equations if I have a SDE of dX(t) = -μ*X(t)*dt + σ*W(t) X0=x0>0 where W(t) i...

1 month ago | 0 answers | 0

Question

Detecting change in sign of values of a column

If I a data file with 3 columns the first being the x cordinates second being the y cordinates and the third being the z. Data(...

1 month ago | 1 answer | 0

Question

Using Runge Kutta function to solve Rossler equations

I have created a runge kutta 4th order function by so

1 month ago | 1 answer | 0

Question

Getting rid of data that does not meet conditions: Poincare section

If I have a data array where the first row corresponds to the x axis second to the y axis and third row to the z axis. I want t...

1 month ago | 1 answer | 0

Question

Deleting columns corresponding to time value

If I have a time axis of t=[0:1:4]; %time step 1 that corresponds to x,y,z data as an array where the first row is x second ...

1 month ago | 2 answers | 0

Question

how to call functions properly: Index in position 1 is invalid. Array indices must be positive integers or logical values.

I'm trying to work with multiple functions but I keep getting this error, its for the runge kutta method solving rossler equatio...

1 month ago | 1 answer | 0

Question

Using ODE45 to solve Rossler equations

The Rossler equations are defined as x'(t)=-x(t)-y(t) y'(t)=ax(t)+y(t) z'(t)=b+z(t)(x(t)-c) and I am trying to use ode45 to...

1 month ago | 1 answer | 0

Question

Data: Interp1 spline and cubic method

Im just trying to figure out how I would use the Interp1 function with the spline method and the Interp1 withe cubic method for...

1 month ago | 1 answer | 0

Question

Summing data columns in a series

If I have a 2 data columns and I want to raise them to the power of K and sum the using sigma notation from k=1 to 10 how would...

1 month ago | 1 answer | 0

Question

Adding new column of data from loop

Say I have a loop running how would I create a new variable that holds the columns I want say. for .... v= %some code ...

1 month ago | 2 answers | 0

Question

Using Polyfiti, Polyval, and plotting

say I have a data file with the first column being days and the second being prices. How would I go about creating an approximat...

1 month ago | 1 answer | 0

Question

Summation of vectors: use of sum function in loop

Say I have a a series %%(1/t)\sqrt{\sum_{k=1}^{s}(vector^t+vectortwo^t)^2}%% or (1/t)*sqrt of (sigma from t=1 to s) (vector^t+v...

2 months ago | 1 answer | 0

Question

Have I used polyfit/polyval correctly

I am just trying to get used to the polyfit and polyval function. My question says to use the polyfit and polyval functions to...

2 months ago | 0 answers | 0

Question

Getting rid of built in vectorised function (Max)

I just wanted to see if its possible to get rid of max in the following whilst still producing the same result. A=[1,2,3,4,5,6...

2 months ago | 0 answers | 0

Question

Getting rid of a for loop

If I have my code as function [value1, value2] = scope(input) c=1; x=length(input); for z=2:x if z...

2 months ago | 3 answers | 0

Question

Calculating ∆t from data set and plotting

If I have financial data with prices as the first column and I create an array of integers from 1 to the length of data to use a...

2 months ago | 0 answers | 0

Question

Plotting prices as a function of time

Im trying to understand data from a data file. If I have d∆t(t) = x(t + ∆t) − x(t) , where ∆t is the trading days difference ...

2 months ago | 0 answers | 0

Question

Plotting data as a function of time

I'm just trying to understand plotting prices as a function of time, if I have price data of prices in a column, say x=[1;2;3;4;...

2 months ago | 1 answer | 0

Question

Use fprintf for data from a table

if I have data from a mat file say 3 7 2005 30 %1st 3 columns are day month year print loss 1 4 2005 35 1 5 2005 24 2 6 20...

2 months ago | 1 answer | 0

Question

converting Matlab plot example

The matlab example page provides which plots 1 value for the maxima and minima on a line graph I am trying to convert it but thi...

2 months ago | 1 answer | 0

Question

How to plot points on a line

Say I have a random sequence of such as new=randn(5,1) which produces y values of ans = -0.9118 0.0494 1.0780 ...

2 months ago | 1 answer | 0

Question

Changing a for loop to recursion

Just wondering if I could get a bit of help on this. How would I change this code to remove the for loop so it operates recursiv...

2 months ago | 1 answer | 0

Question

How to add values from if statements to a column

say I have function [x,y]=valuesof(data) input= data; t=length(data); for z=2:t if input(z-1)>input(z) && input (z)<...

2 months ago | 1 answer | 0

Question

Plotting infinite series on interval

I have the following function for error approximation function y = Approx(x,N); Approx=zeros(1,length(x)); for n=0:N Ap...

2 months ago | 0 answers | 0