Help on Cumulative Frequency & cumulative Probability arrays

2 visualizaciones (últimos 30 días)
BigWaffle
BigWaffle el 26 de Abr. de 2021
Editada: BigWaffle el 26 de Abr. de 2021
I am a novice at Matlabs(started 2 weeks ago) and I am trying to create an array named V that increments (V+1) in units of one minute starting at 0. Then make an array that computes the cumulative frequency of array Z, which are less than or equal to the time in minutes specified by the minutes array, V. Finally, I want to create an array(call it "H") that computes the cumulative probability of getting value in array Z that is less than or equal to the time specified in the minutes array(array V). I am unsure if what i have so far is correct. I believe it should be up to frequency unsure how to get a cumlative probality function. I read that a while loop could be a more effecient way of doing this.
X1= sqrt(rand(1,1000));
X2= normrnd(20,5, 1,1000);
w= rand(1,1000);
X3 = (-log(1- w));
sz = [1 1000];
X4 = unifrnd(4,15, sz);
Z=X1+X2+X3+X4; %(note: Z is an array with 1000 values in one row)
v = linspace(1, 1000, 1000); % linspace(start, stop, numSteps)
V = v >= Y;
freqV = numel(find(V==1));
% H = normcdf(V)?????
Is there a SIMPLER way of doing this as a while loop?

Respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by