matlab 梯度法(最速下降法)
2024-08-31 04:59:01
norm(A,p)
当A是向量时
norm(A,p) Returns sum(abs(A).^zhip)^(/p), for any <= p <= ∞.
norm(A) Returns norm(A,)
norm(A,inf) Returns max(abs(A)).
norm(A,-inf) Returns min(abs(A)).
当A是矩阵时
n = norm(A) returns the largest singular value of A, max(svd(A))
n = norm(A,) The -norm, or largest column sum of A, max(sum(abs(A)).
n = norm(A,) The largest singular value (same as norm(A)).
n = norm(A,inf) The infinity norm, or largest row sum of A, max(sum(abs(A')))
n = norm(A,'fro') The Frobenius-norm of matrix A, sqrt(sum(diag(A'*A))).
A'*A的n个非负特征值的平du方根叫作矩阵A的奇异值
解 (i)∇f (x) =(2x() ,50x() )T
编写 M 文件detaf.m,定义函数 f (x)及其梯度列向量如下
function [f,df]=detaf(x);
f=x()^+*x()^;
df=[*x()
*x()];
(ii)编写主程序文件zuisu.m如下:
clc
x=[;];
[f0,g]=detaf(x);
while norm(g)>0.000001
p=-g/norm(g);
t=1.0;f=detaf(x+t*p);
while f>f0
t=t/;
f=detaf(x+t*p);
end
x=x+t*p;
[f0,g]=detaf(x);
end
x,f0
最新文章
- 谈谈iOS中的锁
- c/s模式 (C#)下Ftp的多文件上传及其上传进度
- codeforces 713A A. Sonya and Queries(状态压缩)
- soem函数库的编译
- X-UniTMX:导入大型Tiled地图文件(*.tmx)到Unity3d中比较好的插件
- yhd日志分析(一)
- 树-伸展树(Splay Tree)
- nyoj 540 奇怪的排序
- Python进阶之map()、reduce()、filter()
- 支付宝集成时的InvalidKeySpecException
- Digital Tutors - Introduction to Scripting Shaders in Unity 学习笔记
- Java面向对象 包
- 理解Object.defineProperty()
- 在Windows2008r2 安装.net4.5
- docker之使用System.Drawing生成图片缺少Gdiplus.dll错误
- 转载及总结:cron表达式详解,cron表达式写法,cron表达式例子
- [转]BTC手续费计算,如何设置手续费
- MVC中返回json数据的两种方式
- [转][C#]降级.net 源码4.5
- (转)Eclipse导入EPF配置文件
热门文章
- EventBus/EventQueue 再思考
- pyenv,轻松切换各种python版本
- GitHub 热点速览 Vol.21:Go 新手起手式,学就完事儿了
- C# HttpClient 使用 Consul 发现服务
- 如何为Form表单的多个提交按钮指定不同的Action地址?
- pycharm激活码,亲测有效
- NO.5 CCS运行demo(云端)
- Robot Framework(12)- 详细解读 RF 的变量和常量
- webpack@next webpack-multi-page-cli 多页脚手架2.0
- 非静态代码块(非static初始化块)&;静态代码块(static初始化块)