matlab学习计划11.4

本文详细介绍了MATLAB中max, min和mean函数的使用,特别是在神经网络中的应用。max函数返回最大值,min函数返回最小值,mean函数计算平均值。它们可以应用于向量、矩阵和多维数组,且支持按维度操作。在神经网络中,这些函数对于数据预处理和网络训练至关重要。" 114105596,10544233,Java Web Filter实现登录验证,"['Java Web', '过滤器', '登录验证']
摘要由CSDN通过智能技术生成

1.minmax用于计算向量的max/min,因此事实上range函数可以用maxmin间接实现。maxmin主要在神经网络中用到,也可以在其他场合使用:

Y=minmax(X)

Minmax函数默认针对==行向量==进行计算。so,如果X是(m**n)矩阵,Y返回一个m***2的矩阵,每行元素对应max/min。X还可以十一矩阵为元素组成的cellArray.

>> rng(2,'v4')
>> a=rand(3,4)

a =

    0.0258    0.1901    0.2319    0.0673
    0.9210    0.8673    0.1562    0.3843
    0.7008    0.4185    0.7385    0.9427

>> minmax(a)

ans =

    0.0258    0.2319
    0.1562    0.9210
    0.4185    0.9427

>> x=nndata([1;2],3,4)

x = 

    [1x3 double]    [1x3 double]    [1x3 double]    [1x3 double]
    [2x3 double]    [2x3 double]    [2x3 double]    [2x3 double]

>> mm=minmax(x)%计算细胞数字的max/min

mm = 

    [1x2 double]
    [2x2 double]

>> mm{
  1}

ans =

    0.0167    0.8921

>> mm{
  2}

ans =

    0.0222    0.8808
    0.0840    0.8560

2.nndata函数:创建神经网路数据

function x = nndata(elements,samples,timesteps,value)
%NNDATA Create neural network data.
%
%  <a href="matlab:doc nndata">nndata</a> creates data in the cell array data format used by
%  Neural Network Toolbox software.
%
%  Neural network cell data consists of a cell array which has as many rows
%  as there are signals and as many columns as there are timesteps.
%  Each element {i,j} of the cell array is a matrix which has as many rows
%  as the ith signal has elements and as many columns as there are samples.  
%
%  <a href="matlab:doc nndata">nndata</a>(N,Q,TS) returns random neural network data in cell array form.
%  It takes an M-element row vector N of element sizes for
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值