concatenation of strings and strings vectors
car=joinstr(varargin)
* objects which can be strings or column vectors of strings; each vector must have the same size
* car = a string
namex=['x1' 'x2']; namec=['a1' '(a2-a1)'];str=joinstr('namec','*','namex','+') // returns str='a1*x1+(a2-a1)*x2' joinstr('(',res('namex'),')*(',string(res('beta')),')+')+')' // takes the names of variables from, say, an ols regression, multiply each name by the value of the corresponding estimated coefficient and them adds all. | ![]() | ![]() |