作业帮 > 综合 > 作业

matlab 直线与曲线的交点问题,

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/10 06:43:26
matlab 直线与曲线的交点问题,
我用其他软件得到了一个很庞大的数据(excel格式),将它导入到matlab中后形成一个130行*100列的矩阵,该矩阵奇数列数值相同(为时间),偶数列数值不同该矩阵(为浓度),但单调递减,现想找到偶数列中第一个小于0.06这一数值所对应的时间(奇数列的相同位置的数值).
目前我自己的做法是:
function ab;
clear;
data=xlsread('data.xls'); % firstly import the data derived from ACSLX to the MATLAB
number=input('请输入次数:') % times of Monte Carlo Simulation
max=number*2; % Columns of the data,it is 2*ab times
t=data(:,1) % time
cliver=data(:,2:2:max) % Concentrations
MRL=0.06; % MRL
for i=1:number;
wtl=find(cliver(:,i)
!
我只能修改已经提交的答案来继续回答你的问题,修改见加了%的注释部分(你可以试一下追问功能)
加一句判断语句就行如果该列没有找到小于0.06的话就跳过去
function ab;
clear;
data=xlsread('data.xls'); % firstly import the data derived from ACSLX to the MATLAB
number=input('请输入次数:') % times of Monte Carlo Simulation
max=number*2; % Columns of the data, it is 2*ab times
t=data(:,1) % time
cliver=data(:,2:2:max) % Concentrations
MRL=0.06; % MRL
for i=1:number;
wtl=find(cliver(:,i)