how to plot different simulated data in one graph?

2 ビュー (過去 30 日間)
Hydro
Hydro 2014 年 9 月 25 日
回答済み: Azzi Abdelmalek 2014 年 9 月 25 日
I wanted to run the following hypothesis based on power function. my three run consist of n=10,100 and 1000 and i want them to be on a single plot. can anyone help me out here. i know that hold will do this however, i will be losing my first run plot then.
*function vartest2_power;
nsimul=1000; % Number of repeated experiments
n=10; % Sample size
s=1+(0:0.1:1); % Values for the standard deviation of y
for i=1:length(s)
% Simulate x from a N(0,1) and y from a N(0,s) distribution
x=randn(n,nsimul);
y=s(i)*randn(n,nsimul);
for j=1:nsimul
h(j)=vartest2(x(:,j),y(:,j)); % Perform F-test
end
rejectrate(i)=sum(h==1)/nsimul; % Calculate rejection probability
end
plot(s,rejectrate)*

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 9 月 25 日
use hold on

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by