jonathf/matlab2cpp

Krasch vid komplicerad konkatenering

aronandersson opened this issue · 1 comments

Traceback (most recent call last):
  File ".\mconvert.py", line 35, in <module>
    tree = matlab2cpp.main(args)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\__init__.py", line 44, in main
    unassigned = builder.load(filename)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 65, in load
    self.create_program(filename)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 263, in create_program
    cur, line = self.create_function(program, cur, line)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 458, in create_function
    cur, line = self.fill_codeblock(block, cur, line)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 582, in fill_codeblock
    cur, line = self.create_assign(block, cur, line, eq_loc)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 676, in create_assign
    cur_, line = self.create_expression(assign, k, line, end)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 1940, in create_expression
    cur, line = self.create_variable(node, start, line)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 1387, in create_variable
    last, line = self.create_list(node, k, line)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 1535, in create_list
    _, line = self.create_expression(parent, start, line, end)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 1933, in create_expression
    cur, line = self.create_matrix(node, start, line)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 907, in create_matrix
    L = self.iterate_list(cur)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 2031, in iterate_list
    return self.iterate_space_list(start)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 2101, in iterate_space_list
    end = self.findend_expression_space(k)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 2176, in findend_expression_space
    k = last = self.findend_string(k)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 2301, in findend_string
    assert k != -1
AssertionError

function x= tveq_newton(a) 

Hp = full([H11p afac*A'; afac*A zeros(K)]);

En till:

function xp = l1dantzig_pd(x0, A, At, b, epsilon, pdtol, pdmaxiter, cgtol, cgmaxiter)

rdual = gradf0 + [lamu1-lamu2 + AtAv; -lamu1-lamu2];

end


  87    3   Assign        'rdual = gradf0 + [lamu1-lamu2 + AtAv; -lamu1-lamu2]'
  87    3     Var         'rdual'
  95    3     Expression  'gradf0 + [lamu1-lamu2 + AtAv; -lamu1-lamu2]'
  95    3     Expression  'gradf0'
  95    3     Var         'gradf0'
 104    3     Expression  '[lamu1-lamu2 + AtAv; -lamu1-lamu2]'
 104    3     Matrix      '[lamu1-lamu2 + AtAv; -lamu1-lamu2]'
 105    3     Vector      'lamu1-lamu2 + AtAv'
 105    3     Expression  'lamu1-lamu2'
 105    3     Expression  'lamu1'
 105    3     Var         'lamu1'
 111    3     Expression  'lamu2'
 111    3     Var         'lamu2'
 117    3     Expression  '+ AtAv'
Traceback (most recent call last):
  File ".\mconvert.py", line 35, in <module>
    tree = matlab2cpp.main(args)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\__init__.py", line 44, in main
    unassigned = builder.load(filename)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 65, in load
    self.create_program(filename)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 263, in create_program
    cur, line = self.create_function(program, cur, line)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 458, in create_function
    cur, line = self.fill_codeblock(block, cur, line)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 582, in fill_codeblock
    cur, line = self.create_assign(block, cur, line, eq_loc)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 676, in create_assign
    cur_, line = self.create_expression(assign, k, line, end)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 1849, in create_expression
    self.create_expression(node, s, line, e, opr)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 1933, in create_expression
    cur, line = self.create_matrix(node, start, line)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 928, in create_matrix
    self.create_expression(vector, start, line, end)
  File "C:\Anaconda\lib\site-packages\matlab2cpp\treebuilder.py", line 1939, in create_expression
    assert self.code[start] in letters+"@"
AssertionError

function xp = l1dantzig_pd(x0, A, At, b, epsilon, pdtol, pdmaxiter, cgtol, cgmaxiter)

rdual = gradf0 + [lamu1-lamu2 + AtAv; -lamu1-lamu2];

end