作业帮 > 综合 > 作业

英语翻译What you are doing makes no sense: you define some value

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/27 17:21:25
英语翻译
What you are doing makes no sense: you define some values as symbolic, and then
try to use them in a numeric solver ode45. You need to decide what you are doing:
are you working with symbolic mathematics or numeric mathematics?
Who told you to use syms? Why do you think these declarations are necessary?
And why do you have plot(t,x) and legend('x(1)','x(2)','x(3)','x(4)','x(5)','x
(6)') before your ode45 call even works?
You need to learn to write code carefully, checking each line that it works and
gives the expected result before moving onto the next. Writing a large amount of
untested code all at once, finding that it does not work and then trying to find
the bugs is not a good way to program. Learn to test your code as you write it. If
you had done this you would have avoided all of the errors in this code.
If you get rid of the syms declarations and defined the values before that
calculation, then the numeric function solving might work, although t is not
currently used anywhere inside the function:
你在做什么是没有意义的:你定义一些值的符号,然后
尝试使用他们在一个数值解法ode45。你需要决定你做什么:
你用符号数学或数值数学工作?
谁告诉你用符号?你为什么认为这些声明是必要的吗?
你为什么有情节(t,x)和传奇(X(1),X(2),X(3),X(4),X(5),X
(6)”)在你电话甚至ode45作品?
你需要学习写代码,仔细检查每一行,它的工作原理和
给出了期望的结果,在移动到下一个。写下了大量的
未经测试的代码一次,发现它不工作,然后试图找到
错误不是程序的一个好方法。学习测试你的代码是你写的。如果
你这样做你可以避免所有的代码中的错误。
如果你摆脱了符号的声明和定义的值之前,
计算,然后数值函数求解可能的工作,虽然不是
在目前使用的任何功能: