A+B: Difference between revisions
Content added Content deleted
No edit summary |
(Added a solution for MATLAB) |
||
Line 444: | Line 444: | ||
===Interactive in a notebook=== |
===Interactive in a notebook=== |
||
<lang Mathematica>Input[] + Input[]</lang> |
<lang Mathematica>Input[] + Input[]</lang> |
||
=={{header|MATLAB}}== |
|||
Completely vectorized version: |
|||
<lang MATLAB>function APlusB() |
|||
disp(sum( str2num(input('Input Stream: ','s')) )); |
|||
end</lang> |
|||
A little unvectorized for clarity. |
|||
<lang MATLAB>function APlusB() |
|||
inputStream = input('Input Stream: ','s'); |
|||
disp(sum( str2num(inputStream) )); |
|||
end</lang> |
|||
=={{header|MUMPS}}== |
=={{header|MUMPS}}== |
||
<lang MUMPS> |
<lang MUMPS> |