w = [u1 u2] + [v1 v2]
Btw, I am using Input to get the vectors as input so the user can type in new vectors each time. The input uses brackets and commas (i.e. [u1,u2] and [v1,v2]).
However, the only way I can can get the traditional "comma-less" format is by using PrintNatural but that pops up a message box. That wouldn't be horrible if I could figure out how to concatenate more than 2 strings at a time...
Anyway, before I get to that, if I just use print, the vectors come out like this:
and I can't figure out how to get rid of the double brackets. I mentioned before that I was just going to find a way out by using concatentation but I would have to use StrJoin so many times it just seems inefficient to me. Does anyone have any ideas? Here is the code I have so far (commented out a couple for testing):
Local u Local v ClrText Input u,"Input first vector [u₁,u₂]:","First Vector" Input v,"Input second vector (onto) [v₁,v₂]","Second Vector (onto)" Print u 'this is just to see what the input looks like Print v 'proj(u,v)⇒w₁ 'w₂=u-w₁ ExpToStr u+v,uplusv 'testing concatenation here StrJoin uplusv,"hi",joined Print joined