213 - A8.5 - Octave code for Graphical Transformations

102 days ago by Professor213

# This code might create a nicer picture using sagecell.sagemath.org Ashift = [ 1 0 -2;0 1 3;0 0 1] Areflect = [-1 0 0;0 1 0;0 0 1] A = Areflect*Ashift pts = [0 0 1;2 4 1;-4 6 1;-5 -2 1]'; # these have been entered transposed to make entering new points easier. new = A*pts; n = size(pts)(2); # this is the number of points that are being transformed...the number of columns of pts axis([-10,10,-10,10]) hold on plot(pts(1,1:n),pts(2,1:n),'r') # x-values are in the first row and y-values are in the second row plot(new(1,1:n),new(2,1:n),'b') 
       
Traceback (click to the left of this block for traceback)
...
    0: re.compile('>> ')
Traceback (most recent call last):    new = A*pts;
  File "", line 1, in <module>
    
  File "/home/sageserver/sage-8.7/local/lib/python2.7/site-packages/sagenb/misc/support.py", line 434, in syseval
    system.chdir(dir)
  File "/home/sageserver/sage-8.7/local/lib/python2.7/site-packages/sage/interfaces/matlab.py", line 296, in chdir
    self.eval("cd('{0}')".format(directory))
  File "/home/sageserver/sage-8.7/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1351, in eval
    for L in code.split('\n') if L != ''])
  File "/home/sageserver/sage-8.7/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 916, in _eval_line
    self._start()
  File "/home/sageserver/sage-8.7/local/lib/python2.7/site-packages/sage/interfaces/matlab.py", line 222, in _start
    Expect._start(self)
  File "/home/sageserver/sage-8.7/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 523, in _start
    raise RuntimeError("unable to start %s: %s" % (self.name(), msg))
RuntimeError: unable to start matlab: End Of File (EOF). Exception style platform.
Matlab finished running /home/sageserver/sage-8.7/local/bin/sage-native-execute matlab -nodisplay
command: /home/sageserver/sage-8.7/local/bin/sage-native-execute
args: ['/home/sageserver/sage-8.7/local/bin/sage-native-execute', 'matlab', '-nodisplay']
buffer (last 100 chars): ''
before (last 100 chars): '/home/sageserver/sage-8.7/local/bin/sage-native-execute: 6: matlab: not found\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: 127
flag_eof: True
pid: 612495
child_fd: 6
closed: False
timeout: None
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 4194304
ignorecase: False
searchwindowsize: None
delaybeforesend: None
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
    0: re.compile('>> ')