function varargout = Chapter1_88_gold(varargin)
clc;
if nargin==3
t=1e-2;
elseif nargin<3||nargin>4
error('输入数量不符')
end
[f,a,b,t]=varargin{:};
x=[a+0.382*(b-a),a+0.618*(b-a)];
count=0;
while abs(a-b)>t
if f(x(1))<f(x(2))
[b,x(2)]=deal(x(2),x(1));
x(1)=a+0.382*(b-a);
else
[a,x(1)]=deal(x(1),x(2));
x(2)=a+0.618*(b-a);
end
count=count+1;
end
if nargout==0
varargout={mean(x)};
elseif nargout>=1
varargout={mean(x),f(mean(x)),count,[a,b]};
end
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
1、资源内容:Matlab数组操作教程(源码).rar 2、代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 3、适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。 4、更多仿真源码和数据集下载列表(自行寻找自己需要的):https://blog.csdn.net/m0_62143653?type=download 5、作者介绍:某大厂资深算法工程师,从事Matlab、Python、C/C++、Java、YOLO算法仿真工作10年;擅长计算机视觉、目标检测模型、智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、智能控制、路径规划、无人机等多种领域的算法仿真实验,更多仿真源码、数据集定制私信+。
资源推荐
资源详情
资源评论
收起资源包目录
Matlab数组操作教程(源码).rar (88个子文件)
Matlab数组操作教程(源码)
Chapter1_60_minehunting.m 155B
Chapter1_35_life.m 537B
Chapter1_24_permuted.m 152B
Chapter1_37_life.m 216B
Chapter1_76_replace_nans.m 119B
Chapter1_64_your_fcn_name.m 131B
Chapter1_3_soroban_evaluate.m 123B
Chapter1_32_pfactors.m 132B
Chapter1_30_pfactors.m 138B
Chapter1_69_your_fcn_name.m 121B
Chapter1_33_pfactors.m 85B
Chapter1_1_soroban_evaluate.m 181B
Chapter1_52_prime_spiral.m 145B
Chapter1_2_soroban_evaluate.m 172B
Chapter1_25_permuted.m 171B
Chapter1_23_permuted.m 108B
Chapter1_50_prime_spiral.m 200B
Chapter1_19_permuted.m 141B
Chapter1_10_your_fcn_name.m 80B
Chapter1_73_replace_nans.m 149B
Chapter1_26_permuted.m 121B
Chapter1_51_prime_spiral.m 232B
Chapter1_8_your_fcn_name.m 84B
Chapter1_53_prime_spiral.m 128B
Chapter1_17_your_fcn_name.m 145B
Chapter1_7_your_fcn_name.m 94B
Chapter1_63_your_fcn_name.m 152B
Chapter1_41_life.m 134B
Chapter1_31_pfactors.m 122B
Chapter1_28_pfactors.m 161B
Chapter1_5_your_fcn_name.m 171B
Chapter1_49_prime_spiral.m 233B
Chapter1_29_pfactors.m 132B
Chapter1_62_your_fcn_name.m 147B
Chapter1_81_replace_zeros_and_NaNs.m 151B
Chapter1_82_replace_zeros_and_NaNs.m 124B
Chapter1_54_minehunting.m 288B
Chapter1_72_replace_nans.m 168B
Chapter1_55_minehunting.m 315B
Chapter1_18_permuted.m 159B
Chapter1_88_gold.m 538B
Chapter1_44_biggest_box.m 229B
Chapter1_83_replace_zeros_and_NaNs.m 147B
Chapter1_75_replace_nans.m 132B
Chapter1_58_minehunting.m 145B
Chapter1_4_soroban_evaluate.m 90B
Chapter1_84_replace_zeros_and_NaNs.m 122B
Chapter1_39_life.m 120B
Chapter1_14_your_fcn_name.m 130B
Chapter1_65_your_fcn_name.m 104B
Chapter1_56_minehunting.m 223B
Chapter1_20_permuted.m 165B
Chapter1_16_your_fcn_name.m 148B
Chapter1_61_minehunting.m 143B
Chapter1_78_replace_nans.m 113B
Chapter1_47_computeVolume.m 239B
Chapter1_6_your_fcn_name.m 93B
Chapter1_70_your_fcn_name.m 111B
Chapter1_80_replace_zeros_and_NaNs.m 235B
Chapter1_11_your_fcn_name.m 93B
Chapter1_57_minehunting.m 174B
Chapter1_67_your_fcn_name.m 117B
Chapter1_79_replace_zeros_and_NaNs.m 182B
Chapter1_48_computeVolume.m 101B
Chapter1_77_replace_nans.m 102B
Chapter1_9_your_fcn_name.m 95B
Chapter1_36_life.m 448B
Chapter1_42_life.m 148B
Chapter1_27_pfactors.m 222B
Chapter1_66_your_fcn_name.m 124B
Chapter1_71_your_fcn_name.m 108B
Chapter1_85_get_recurse.m 209B
Chapter1_59_minehunting.m 161B
Chapter1_12_your_fcn_name.m 232B
Chapter1_34_life.m 269B
Chapter1_38_life.m 253B
Chapter1_74_replace_nans.m 111B
Chapter1_13_your_fcn_name.m 148B
Chapter1_21_permuted.m 176B
Chapter1_22_permuted.m 171B
Chapter1_43_biggest_box.m 210B
Chapter1_46_computeVolume.m 490B
Chapter1_86_get_recurse.m 197B
Chapter1_40_life.m 152B
Chapter1_45_computeVolume.m 506B
Chapter1_68_your_fcn_name.m 128B
Chapter1_15_your_fcn_name.m 130B
Chapter1_87_gold.m 154B
共 88 条
- 1
资源评论
Matlab仿真实验室
- 粉丝: 3w+
- 资源: 2405
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功