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/12/26 15:23:22
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.'];