入门MATLAb遇到了问题,希望大虾帮忙解决
参考书上给的例子,我编过脚本后总是无法运行,提示输入的字符无效,给出脚本求各位指点题目是为使位于25000英尺的速度为v的航天器刚好到达离地面100km的太空,求v运行后...
参考书上给的例子,我编过脚本后总是无法运行,提示输入的字符无效,给出脚本求各位指点 题目是为使位于25000英尺的速度为v的航天器刚好到达离地面100km的太空,求v
运行后出现 Error : The input character is not valid in MATLAB statements or expressions.
1. clear
2. clc
3. cmPerInch = 2.54; % general knowledge
4. inchesPerFt = 12; % general knowledge
5. metersPerCm = 1/100; % general knowledge
6. MetersPerFt = metersPerCm*cmPerInch*inchesPerFt;
7. startFt = 25000; % ft - given
8. startM = startFt*MetersPerFt;
9. g = 9.81; % m/sec^2
10. top = 100; % km - given
11. s = (top*1000)-startM; % m
12. initial_v = (2*g*s)^0.5 % the final answer 展开
运行后出现 Error : The input character is not valid in MATLAB statements or expressions.
1. clear
2. clc
3. cmPerInch = 2.54; % general knowledge
4. inchesPerFt = 12; % general knowledge
5. metersPerCm = 1/100; % general knowledge
6. MetersPerFt = metersPerCm*cmPerInch*inchesPerFt;
7. startFt = 25000; % ft - given
8. startM = startFt*MetersPerFt;
9. g = 9.81; % m/sec^2
10. top = 100; % km - given
11. s = (top*1000)-startM; % m
12. initial_v = (2*g*s)^0.5 % the final answer 展开
3个回答
展开全部
clear
clc
cmPerInch = 2.54; % general knowledge
inchesPerFt = 12; % general knowledge
metersPerCm = 1/100; % general knowledge
MetersPerFt = metersPerCm*cmPerInch*inchesPerFt;
startFt = 25000; % ft - given
startM = startFt*MetersPerFt;
g = 9.81; % m/sec^2
top = 100; % km - given
s = (top*1000)-startM; % m
initial_v = (2*g*s)^0.5 % the final answe
这样就没问题了
clc
cmPerInch = 2.54; % general knowledge
inchesPerFt = 12; % general knowledge
metersPerCm = 1/100; % general knowledge
MetersPerFt = metersPerCm*cmPerInch*inchesPerFt;
startFt = 25000; % ft - given
startM = startFt*MetersPerFt;
g = 9.81; % m/sec^2
top = 100; % km - given
s = (top*1000)-startM; % m
initial_v = (2*g*s)^0.5 % the final answe
这样就没问题了
展开全部
clear
clc
cmPerInch = 2.54;
inchesPerFt = 12;
metersPerCm = 1/100;
MetersPerFt = metersPerCm*cmPerInch*inchesPerFt;
startFt = 25000;
startM = startFt*MetersPerFt;
g = 9.81;
top = 100;
s = (top*1000)-startM;
initial_v = (2*g*s)^0.5
另外注意,不能呢个使用中文输入法下的标点符号,%后的注释语句可以不要
clc
cmPerInch = 2.54;
inchesPerFt = 12;
metersPerCm = 1/100;
MetersPerFt = metersPerCm*cmPerInch*inchesPerFt;
startFt = 25000;
startM = startFt*MetersPerFt;
g = 9.81;
top = 100;
s = (top*1000)-startM;
initial_v = (2*g*s)^0.5
另外注意,不能呢个使用中文输入法下的标点符号,%后的注释语句可以不要
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你是否输入了每行前面的1,2,3,4?这个不能输入!
另外的几个可能
1 是否合法的保存了文件名?
2 输入是否出现中英文掺杂,使用中文输入法下的标点符号?
另外的几个可能
1 是否合法的保存了文件名?
2 输入是否出现中英文掺杂,使用中文输入法下的标点符号?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询