⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 demo_real.sci~

📁 用来实现三维阻抗及光学断层成像重建的matlab程序
💻 SCI~
📖 第 1 页 / 共 2 页
字号:
function []=demo_real()clear; //! clc ignored// clc ;disp('This is a demo for reconstructing real impedance changes');disp(mtlb_sprintf('%s','\n')); mtlb_load('datareal','srf','vtx','simp');  //! mtlb(srf) can be replaced by//!  srf if srf is not an m-file//!  srf() if srf is  an m-file //!! Unknown function vtx ,the original calling sequence is used //!! Unknown function vtx ,the original calling sequence is used //!! Unknown function vtx ,the original calling sequence is used //!! Unknown function trimesh ,the original calling sequence is usedtrimesh(mtlb(srf),vtx(:,1),vtx(:,2),vtx(:,3)); //!! Unknown function axis ,the original calling sequence is usedaxis('image'); //!! Scilab set function is a partial emulation of the Matlab oneset(xget('window'),'Colormap',[0,0,0]);mtlb_hold('on'); disp('This is a cylindrical mesh, wait to attach the electrodes');disp(mtlb_sprintf('%s','\n')); xpause(1000*(4)); mtlb_load('datacom','sels');  //! mtlb(sels) can be replaced by//!  sels if sels is not an m-file//!  sels() if sels is  an m-filefor u = 1:size(mtlb(sels))     //!! Unknown function sels ,the original calling sequence is used     //! mtlb(srf) can be replaced by  //!  srf if srf is not an m-file  //!  srf() if srf is  an m-file     //! mtlb(vtx) can be replaced by  //!  vtx if vtx is not an m-file  //!  vtx() if vtx is  an m-file  paint_electrodes(sels(u),mtlb(srf),mtlb(vtx));end  //!! Unknown function hidden ,the original calling sequence is usedhidden('off');mtlb_load('datareal','gnd_ind','elec','zc','sym'); //Change sym to '{n}' for Cholesky instead of PCG in the forward solversym = '{n}'; mtlb_load('datareal','protocol','no_pl');  //! mtlb(protocol) can be replaced by//!  protocol if protocol is not an m-file//!  protocol() if protocol is  an m-file //! mtlb(elec) can be replaced by//!  elec if elec is not an m-file//!  elec() if elec is  an m-file //! mtlb(vtx) can be replaced by//!  vtx if vtx is not an m-file//!  vtx() if vtx is  an m-file //! mtlb(gnd_ind) can be replaced by//!  gnd_ind if gnd_ind is not an m-file//!  gnd_ind() if gnd_ind is  an m-file //! mtlb(no_pl) can be replaced by//!  no_pl if no_pl is not an m-file//!  no_pl() if no_pl is  an m-file[I,Ib] = set_3d_currents(mtlb(protocol),mtlb(elec),mtlb(vtx),mtlb(gnd_ind),mtlb(no_pl));  //! clc ignored// clc ;disp('Adjacent current patterns selected. Calculating reference measurements');disp(mtlb_sprintf('%s','\n')); xpause(1000*(2)); mat_ref = ones(828,1);//%%%%% //Set the tolerance for the forward solvertol = 0.0001;  //! mtlb(vtx) can be replaced by//!  vtx if vtx is not an m-file//!  vtx() if vtx is  an m-file //! mtlb(%simp) can be replaced by//!  %simp if %simp is not an m-file//!  %simp() if %simp is  an m-file //! mtlb(gnd_ind) can be replaced by//!  gnd_ind if gnd_ind is not an m-file//!  gnd_ind() if gnd_ind is  an m-file //! mtlb(elec) can be replaced by//!  elec if elec is not an m-file//!  elec() if elec is  an m-file //! mtlb(zc) can be replaced by//!  zc if zc is not an m-file//!  zc() if zc is  an m-file[Eref,ppr] = fem_master_full(mtlb(vtx),mtlb(%simp),mat_ref,mtlb(gnd_ind),mtlb(elec),mtlb(zc),sym); //! mtlb(vtx) can be replaced by//!  vtx if vtx is not an m-file//!  vtx() if vtx is  an m-fileVref = forward_solver(mtlb(vtx),Eref,I,tol,ppr); //! mtlb(elec) can be replaced by//!  elec if elec is not an m-file//!  elec() if elec is  an m-file //! mtlb(vtx) can be replaced by//!  vtx if vtx is not an m-file//!  vtx() if vtx is  an m-file //! mtlb(no_pl) can be replaced by//!  no_pl if no_pl is not an m-file//!  no_pl() if no_pl is  an m-file[refH,refV,indH,indV,dfr] = get_3d_meas(mtlb(elec),mtlb(vtx),Vref,Ib,mtlb(no_pl)); //! mtlb(end) can be replaced by//!  end if end is not an m-file//!  end() if end is  an m-filedfr = dfr(1:2:mtlb(end));//Taking just the horrizontal measurements xdel(); //! clc ignored// clc ;disp('Now let us create a couple of changes ...');disp(mtlb_sprintf('%s','\n')); xpause(1000*(2));  mat = mat_ref; mtlb_load('datareal','A','B','');//figure; [mat,grp] = set_inho(srf,simp,vtx,mat_ref,1.1); sA = 1.2;mtlb_sprintf('This one  %f',sA); //! mtlb(A) can be replaced by//!  A if A is not an m-file//!  A() if A is  an m-filemat(mtlb(A)) = sA xset('window',max(winsid()+1))max(winsid()); //! mtlb(srf) can be replaced by//!  srf if srf is not an m-file//!  srf() if srf is  an m-file //!! Unknown function vtx ,the original calling sequence is used //!! Unknown function vtx ,the original calling sequence is used //!! Unknown function vtx ,the original calling sequence is used //!! Unknown function trimesh ,the original calling sequence is usedtrimesh(mtlb(srf),vtx(:,1),vtx(:,2),vtx(:,3)); //!! Unknown function axis ,the original calling sequence is usedaxis('image'); //!! Scilab set function is a partial emulation of the Matlab oneset(xget('window'),'Colormap',[0,0,0]); //!! Unknown function hidden ,the original calling sequence is usedhidden('off');mtlb_hold('on'); //! mtlb(vtx) can be replaced by//!  vtx if vtx is not an m-file//!  vtx() if vtx is  an m-file //! mtlb(%simp) can be replaced by//!  %simp if %simp is not an m-file//!  %simp() if %simp is  an m-filerepaint_inho(mat,mat_ref,mtlb(vtx),mtlb(%simp)); //!! Unknown function camlight ,the original calling sequence is usedcamlight('lefth'); //!! Unknown function lighting ,the original calling sequence is usedlighting('flat'); //!! drawnow ignored// drawnow ;xpause(1000*(4));xdel();sB = 0.9; //! mtlb(B) can be replaced by//!  B if B is not an m-file//!  B() if B is  an m-filemat(mtlb(B)) = sB xset('window',max(winsid()+1))max(winsid()); //! mtlb(srf) can be replaced by//!  srf if srf is not an m-file//!  srf() if srf is  an m-file //!! Unknown function vtx ,the original calling sequence is used //!! Unknown function vtx ,the original calling sequence is used //!! Unknown function vtx ,the original calling sequence is used //!! Unknown function trimesh ,the original calling sequence is usedtrimesh(mtlb(srf),vtx(:,1),vtx(:,2),vtx(:,3)); //!! Unknown function axis ,the original calling sequence is usedaxis('image'); //!! Scilab set function is a partial emulation of the Matlab oneset(xget('window'),'Colormap',[0,0,0]); //!! Unknown function hidden ,the original calling sequence is usedhidden('off');mtlb_hold('on'); //! mtlb(vtx) can be replaced by//!  vtx if vtx is not an m-file//!  vtx() if vtx is  an m-file //! mtlb(%simp) can be replaced by//!  %simp if %simp is not an m-file//!  %simp() if %simp is  an m-filerepaint_inho(mat,mat_ref,mtlb(vtx),mtlb(%simp)); //!! Unknown function camlight ,the original calling sequence is usedcamlight('lefth'); //!! Unknown function lighting ,the original calling sequence is usedlighting('flat'); mtlb_sprintf('And this one at  %f',sB);disp(mtlb_sprintf('%s','\n'));  //!! drawnow ignored// drawnow ;xpause(1000*(4));xdel();//[mat,grp] = set_inho(srf,simp,vtx,mat,0.999); disp('Simulating measurements based on the CEM ...');   //! mtlb(vtx) can be replaced by//!  vtx if vtx is not an m-file//!  vtx() if vtx is  an m-file //! mtlb(%simp) can be replaced by//!  %simp if %simp is not an m-file//!  %simp() if %simp is  an m-file //! mtlb(gnd_ind) can be replaced by//!  gnd_ind if gnd_ind is not an m-file//!  gnd_ind() if gnd_ind is  an m-file //! mtlb(elec) can be replaced by//!  elec if elec is not an m-file//!  elec() if elec is  an m-file //! mtlb(zc) can be replaced by//!  zc if zc is not an m-file//!  zc() if zc is  an m-file[En,ppn] = fem_master_full(mtlb(vtx),mtlb(%simp),mat,mtlb(gnd_ind),mtlb(elec),mtlb(zc),sym); //! mtlb(vtx) can be replaced by//!  vtx if vtx is not an m-file

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -