Question

Monte Carlo simulation to calculate mean excess function

How do I calculate the true mean excess function together with the mean excess function with the monte carlo method, for i.i.d. ...

1 year ago | 0 answers | 0

Question

mean excess function monte carlo simulation

If I have i.i.d random variables on U~(0,1) (a) Yi = Xi, and Mn = max{Y1,...,Yn} (b) Ui = 1/Xi, and Mn = max{U1,...,Un} I un...

1 year ago | 0 answers | 0

Question

Three state markov chain: plotting graphs

If I have a three state markov chain T=[2/3,0,1/3;1/4,3/4,0;1/3,0,2/3]; How would I get the quantity in the picture, and is it...

1 year ago | 0 answers | 0

Question

Random variables from uniform distribution

Hi, I'm relatively new to working with probability but is there anyway to do this in matlab. If I have Independent and identic...

1 year ago | 0 answers | 0

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

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

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

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

1 year 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;...

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

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

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

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

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

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

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

1 year 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;...

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

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

1 year ago | 1 answer | 0