📄 file_rea.m
字号:
function [cp_num,hard,a,cp]=file_reader(infil);% This function find the length of the current record [m,n]=size(infil);char_zero=48;% cp_val is by default set to 1 for fullfield solutions, in the case of% a modified boundary layer formultion cp_val gets the value 2, and% if the model type is not known cp_val get the value 0;cp_val=1; if infil(1)=='c' cp_num=1; cp='ccp';elseif infil(1)=='d' cp_num=4; cp='dec';elseif infil(1)=='s' & infil(3)=='c' cp_num=2; cp='sec';elseif infil(1)=='s' & infil(3)=='b' cp_num=3; cp='seb';elseif infil(1)=='m' cp='mbl' cp_num=0; cp_val=2;else cp_val=0; cp_num=0; cp='udg'; 'undefined geometry'end % the hardening rates is determined in this section of the routineif cp_val==1 a=(abs(infil(5))-char_zero)*100; if infil(6)=='1' hard='13'; elseif infil(6)=='6' hard='06'; elseif infil(6)=='3' hard='03'; elseif infil(6)=='n' hard='nh'; else hard='unrecognised hardening rate'; end elseif cp_val==2 if infil(5)=='1' hard='13'; elseif infil(5)=='6' hard='06'; elseif infil(5)=='3' hard='03'; elseif infil(5)=='n' hard='nh'; else hard='unrecognised hardening rate'; endend 'the analysed crack problem is a :',cp 'and have a crack problem number :',cp_num 'the hardening rate is',hard 'the crack length is',a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -