How to write code for this?

Dear All,
I want to plot ROTI. Would you please help me? The ROTI is defined as the standard deviation of ROT, given by (<ROT^2> - <ROT>^2)^1/2 for each 5-min interval.

 Accepted Answer

x = rand(100,1) ;
y = sqrt(mean(x.^2)-mean(x)^2)
y = 0.2657

4 Comments

@Ara comment moved here:
Thank you for you reply.
How to calculate standard deviation for each 5 min interval?
y=std(sqrt(mean(x.^2)-mean(x)^2));
Is that correct
You see, (sqrt(mean(x.^2)-mean(x)^2) is a single number, you cannot find stanard deviation. May be you need to find this number for every five minutes ata and then get Std of that array.
Ara
Ara on 5 Jun 2022
Edited: Ara on 6 Jun 2022
I think you are right. I have a column of time. How to write for every 5 min data and then get the std?
Kindly check the code again that is not how to calculate ROI

Sign in to comment.

More Answers (0)

Categories

Tags

Asked:

Ara
on 5 Jun 2022

Commented:

on 14 Nov 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!