matlab概率论例子

  1. 高斯概率模型:
bash 复制代码
[f,xi] = ksdensity(x): returns a probability density estimate, f, for the sample in the vector x. 
The estimate is based on a normal kernel function, and is evaluated at 100 equally spaced points, xi, that cover the range of the data in x.

代码:

bash 复制代码
>> %Give a random sample
x=[2*randn(6000,1); 5+randn(4000,1)];
%Calculate the probability density of each point
[f,xi]=ksdensity(x);
%plot
subplot(211);
plot(x);
title('Sample Data')
subplot(212);
plot(xi,f);
title('PDF');
>> 

图形:

  1. 产生高斯样本点

代码:

bash 复制代码
clear all;  clc;
N=6;
s01=randi([0,1],N,1); % 01 random sequence
s=2*s01-1;    % +1-1 random sequence
w=randn(N,1); % Gaussian distribution
x=rand(N,1);  % Uniform  distribution
[s01,s,w,x]

输出:

相关推荐
AI科技星6 小时前
《全域数学/数术工坊》体系总览
c语言·开发语言·汇编·electron·概率论
lhjcsubupt10 小时前
第二十二篇 从随机过程到IMU噪声模型
算法·机器学习·概率论
做cv的小昊1 天前
计算机图形学:【Games101】学习笔记08——光线追踪(辐射度量学、渲染方程与全局光照、蒙特卡洛积分与路径追踪)
图像处理·笔记·学习·计算机视觉·游戏引擎·图形渲染·概率论
KWTXX1 天前
测试工具-论文 MATLAB 仿真复现【成功】
开发语言·matlab
jllllyuz1 天前
MATLAB实现滚动轴承故障诊断(外圈故障)
开发语言·人工智能·matlab
slandarer1 天前
MATLAB | 韦恩图的高阶版: UpSet图 更新升级啦!
开发语言·matlab
南檐巷上学1 天前
基于改进型CNN神经网络的车牌定位识别系统(Matlab)
人工智能·神经网络·matlab·cnn·车牌识别·vgg
cici158741 天前
基于Matlab的数字全息相位展开及再现实现
开发语言·matlab
AI科技星1 天前
数术工坊:投影秘籍
人工智能·线性代数·架构·概率论·学习方法
fie88891 天前
基于有限体积法(FVM)的MATLAB流体力学求解程序
算法·matlab