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

📄 new2.m

📁 vTools is a toolbox for Matlab 5.3 developed within the Department of Electrical Systems and A
💻 M
字号:
function new2
%NEW2 : callback del bottone "SAVE MATRIX" 
% Salvataggio nuova matrice
% 
% Massimo Davini   28/05/99 revised 19/03/00

global stack;

go=1;
matrice=findobj('tag','matrice');

for i=1:length(matrice)
   if isempty(str2num(get(matrice(length(matrice)+1-i),'string')))
      go=0;
   else
      coeff(i)=str2num(get(matrice(length(matrice)+1-i),'string'));
   end;
end;

if go==1  
%-----parametri consistenti
 ind=stack.temp.matrice;       %indice della matrice visualizzata   
 switch ind
 case 1, label='A';
 case 2, label='B';
 case 3, label='C';
 case 4, label='D';
 end;

 eval(sprintf('[row,col]=size(stack.temp.%s);',label));
 matrix=zeros(row,col);
 for i=1:row , for j=1:col
       matrix(i,j)=coeff(j+(i-1)*col);
 end; end;
 eval(sprintf('stack.temp.%s=matrix;',label));
 eval(sprintf('stack.temp.flag%s=1;',label));
   
 set(stack.temp.handles(13+ind),'string',sprintf('[ %s ]',label));
   
 if (stack.temp.flagA)&(stack.temp.flagB)&...
             (stack.temp.flagC)&(stack.temp.flagD)
   stack.general.model='Untitled.mat';
   stack.general.A=stack.temp.A;  stack.general.B=stack.temp.B; 
   stack.general.C=stack.temp.C;  stack.general.D=stack.temp.D;
   stack.general.M_flag=1;          %flag di nuovo sistema
      
   stack.evaluation=[];  stack.simulation=[];
      
   %ind 

⌨️ 快捷键说明

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