matlab num2str语句总是通不过,出现了什么问题?%script file:c14_date.m%set decay constant for c-14lamda=0.00012097;%prompt the user for the percentage of c-14 remaining.percent=input('enter the percentage of canbon 14 remaining:\n');%Perfo
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/02 00:50:19
![matlab num2str语句总是通不过,出现了什么问题?%script file:c14_date.m%set decay constant for c-14lamda=0.00012097;%prompt the user for the percentage of c-14 remaining.percent=input('enter the percentage of canbon 14 remaining:\n');%Perfo](/uploads/image/z/7825864-40-4.jpg?t=matlab+num2str%E8%AF%AD%E5%8F%A5%E6%80%BB%E6%98%AF%E9%80%9A%E4%B8%8D%E8%BF%87%2C%E5%87%BA%E7%8E%B0%E4%BA%86%E4%BB%80%E4%B9%88%E9%97%AE%E9%A2%98%3F%25script+file%3Ac14_date.m%25set+decay+constant+for+c-14lamda%3D0.00012097%3B%25prompt+the+user+for+the+percentage+of+c-14+remaining.percent%3Dinput%28%27enter+the+percentage+of+canbon+14+remaining%3A%5Cn%27%29%3B%25Perfo)
matlab num2str语句总是通不过,出现了什么问题?%script file:c14_date.m%set decay constant for c-14lamda=0.00012097;%prompt the user for the percentage of c-14 remaining.percent=input('enter the percentage of canbon 14 remaining:\n');%Perfo
matlab num2str语句总是通不过,出现了什么问题?
%script file:c14_date.m
%set decay constant for c-14
lamda=0.00012097;
%prompt the user for the percentage of c-14 remaining.
percent=input('enter the percentage of canbon 14 remaining:\n');
%Perform calculations
ratio=percent/100;
age=(-1.0/lamda)*log(ratio);
%Tell the user about the age of the sample.
string=['the age of the sample is'num2str(age) 'years.'];
disp(string);
Error:File:c14_date.m Line:11 Column:35
Unexpected MATLAB expression.
总是通不过,请问出现了什么问题?
matlab num2str语句总是通不过,出现了什么问题?%script file:c14_date.m%set decay constant for c-14lamda=0.00012097;%prompt the user for the percentage of c-14 remaining.percent=input('enter the percentage of canbon 14 remaining:\n');%Perfo
哈,楼主您少加了个空格吧
string=['the age of the sample is'num2str(age) 'years.'];
改为(is'后加一个空格)
string=['the age of the sample is' num2str(age) 'years.'];