coenter.m
来自「一本关于工程线性代数及其matlab编程方面的好书。」· M 代码 · 共 27 行
M
27 行
% ATLAST65中的程序cogame调用的子程序
function coenter
% This function is the callback for the edit box that receives
% new values for the coordinates of a user's guess.
%
% By Emily Moore.
w=2;
h1 = findobj( gcf, 'Tag', 'enterpair' );
h2 = findobj( gcf, 'Tag', 'storepairs' );
str = get(h1, 'String');
strlist = get(h2, 'String');
eval( ['A = [' str '];' ] ) % extra []'s don't hurt
%eval(['A = ' str ';']) % extra []'s don't hurt
h = findobj( gcf, 'Tag', 'xvec' );
x = get( h, 'Userdata' );
h = findobj( gcf, 'Tag', 'yvec' );
y = get( h, 'Userdata' );
v = A(1)*x + A(2)*y;
hold on
h = drawvec(v, 'm', w);
newlist = str2mat( [' ' str], strlist );
set( h2, 'String', newlist )
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?