??? Error using ==> nlinfit at 127 MODELFUN should return a vector of fitted values the same length
来源:互联网 发布:win平板装ubuntu 编辑:程序博客网 时间:2024/06/05 11:23
??? Error using ==> nlinfit at 127 MODELFUN should return a vector of fitted values the same length
这个问题应该是利用matlab进行非线性拟合时经常会遇到的问题
它的中文意思应该是:“模板函数应该返回一个与y等长的向量”
看一下程序:
x=[3.2,3.6,3.8,4,4.2,4.5,4.8,5,5.3,5.4,5.6,5.8,6,6.2,6.4,6.6,6.9,7.1]';y=[0.38,0.66,1,0.77,0.5,0.33,0.66,0.83,0.33,1,0.33,0.5,0.33,0.71,0.71,1,0.87,0.83]';myfunc = inline('1./(beta(1)+beta(2).*exp(-x))','beta','x');beta0 = [0.2,0.2]';beta = nlinfit(x,y,myfunc,beta0);
上面的程序是正确的,出现这个问题是因为myfunc定义为隐函数,所以算术操作时都需要变为点乘或者点除,注意点除和点乘都需要保证
再例:
y=beta(1).*exp(-beta(2).*1000./(8.314*x));
1 0
- ??? Error using ==> nlinfit at 127 MODELFUN should return a vector of fitted values the same length
- svm 错误 Error using ==> svmtrain at 232 Y must be a vector or a character array.
- Given a binary tree, return the postorder traversal of its nodes' values.
- Given a binary tree, return the preorder traversal of its nodes' values.
- LeetCode Given a binary tree, return the postorder traversal of its nodes' values.
- Given a binary tree, return the preorder traversal of its nodes' values.
- xilinx "ERROR:EDK - intc () - Internal error: Num intr inputs 1 not the same as length of ..."解决
- How to get the Values of Selected Row from a Gridview using ASP.NET
- The max length of a byte array
- given an array of integers Find the index of values that satisfy A+B = C + D
- Read and write a FileStream at the same time
- a wifi router connects 70 users at the same time
- can’t convert between vector values of different size return (__m64) __builtin_ia32_vec_init_v2si
- Restful API becomes 404 when using the CXF at the same time
- [MapReduce] correlation between the length of a post and the length of answers
- Using MERGE in SQL Server to insert, update and delete at the same time
- Error: A library uses the same package分析和处理
- A Presentation of the STL Vector Container
- hosts文件的作用
- Struts2第七篇【介绍拦截器、自定义拦截器、执行流程、应用】
- TortoiseGit之配置密钥
- 关于ionic ion-nav-back-button 标题隐藏及修改
- ReactiveCocoa入门教程之信号的使用
- ??? Error using ==> nlinfit at 127 MODELFUN should return a vector of fitted values the same length
- 商品展示案例
- 项目进度管理·八
- 【JQuery:多个页面在同一个div内显示】
- 4868: [Shoi2017]期末考试
- 图论-最短路径-spfa两种实现方式-poj3259
- centos 7 , mac os 安装fish shell
- Spark之SparkStreaming案例-transform
- WPF Example-Heart Curve(心形曲线)