当前位置:网站首页>Matlab Error (Matrix dimensions must agree)
Matlab Error (Matrix dimensions must agree)
2022-07-07 03:10:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack
xOld =input(‘Enter initial guess: ‘);
errortmp =2;
counter =0;
while (errortmp>10^-10)
xNew =xOld – Jf3(xOld)\f3(xOld)
counter=counter+1
error=norm(xNew-xOld,inf)+4*eps*norm(xNew,inf)
if(error>=errortmp)
error(‘shit!’);
else
errortmp=error;
end
xOld = xNew;
pause
end
function J=Jf3(x)
J=[0 0 1 1;
x(3) x(4) x(1) x(2);
2*x(3)*x(1) 2*x(4)*(x(2)) x(1)^2 x(2)^2;
3*x(3)*x(1)^2 3*x(4)*(x(2))^2 x(1)^3 x(2)^3];
function y=f3(x)
y=[x(3)+x(4)-2;
x(3)*x(1) + x(4)*x(2);
x(3)*x(1)^2 + x(4)*x(2)^2 – (2/3);
x(3)*x(1)^3 + x(4)*x(2)^3];
end
// When the user enters a value . Be sure to enter a matrix, You can't just enter a value , Otherwise it will show :Matrix dimensions must agree
Input 1; // At this time, what we input is only a number
Input 1 2 2 3; // At this time, what we input is not matrix
Input [1 2 3 4 ] // At this time, what we input is not matrix
Input [1;2;3;4] // correct
This is from to , Input value table and table processing function are different , So the error code will be displayed
Copyright notice : This article is the original article of the blogger . Blog , Do not reprint without permission .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/116791.html Link to the original text :https://javaforall.cn
边栏推荐
- LeetCode 77:组合
- Leetcode 77: combination
- A complete tutorial for getting started with redis: AOF persistence
- c语言(字符串)如何把字符串中某个指定的字符删除?
- Convert widerperson dataset to Yolo format
- Another million qubits! Israel optical quantum start-up company completed $15million financing
- Redis入门完整教程:复制原理
- IDEA重启后无法创建Servlet文件的解决方案
- SQL中删除数据
- 知识图谱构建全流程
猜你喜欢

Redis getting started complete tutorial: replication topology

centerX: 用中国特色社会主义的方式打开centernet

The first symposium on "quantum computing + application of financial technology" was successfully held in Beijing

杰理之在非蓝牙模式下,手机连接蓝牙不要跳回蓝牙模式处理方法【篇】

【Socket】①Socket技术概述

尚硅谷JVM-第一章 类加载子系统

Redis入门完整教程:复制配置

Unity uses maskablegraphic to draw a line with an arrow
![[socket] ① overview of socket technology](/img/91/dccbf27a17418ea632c343551bccc0.png)
[socket] ① overview of socket technology

Error: could not find a version that satisfies the requirement xxxxx (from versions: none) solutions
随机推荐
如何分析粉丝兴趣?
2022 spring recruitment begins, and a collection of 10000 word interview questions will help you
Django database (SQLite) basic introductory tutorial
How to analyze fans' interests?
Left path cloud recursion + dynamic planning
惯导标定国内外研究现状小结(删减版)
sshd[12282]: fatal: matching cipher is not supported: [email protected] [preauth]
PSINS中19维组合导航模块sinsgps详解(初始赋值部分)
Introduction to ins/gps integrated navigation type
Redis入门完整教程:客户端常见异常
Redis入门完整教程:客户端案例分析
INS/GPS组合导航类型简介
Development of wireless communication technology, cv5200 long-distance WiFi module, UAV WiFi image transmission application
Left value, right value
Redis入门完整教程:RDB持久化
从控制理论的角度谈数据分析
Es6中Promise的使用
C language string sorting
Intelligent static presence detection scheme, 5.8G radar sensing technology, human presence inductive radar application
Redis入门完整教程:AOF持久化