I am making a script-m file to produce results of a formula in a Matrix output.(adsbygoogle = window.adsbygoogle || []).push({});

But, it does not consider all combination. How can I make it stop at a 'i' value so all 'j' values can be matched to that and solved for 'k' before proceeding. In my code, it just does one round of 'i' and 'j' values.Code (Text):function s = calc(a, b)

i = [-a: 1: a];

j = [-b: 1: b];

k = i.^2 + j.*i;

A = [i' j' k']

disp('i j k'), disp(A)

**Physics Forums - The Fusion of Science and Community**

# Matrix Output (Matlab)

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

Have something to add?

- Similar discussions for: Matrix Output (Matlab)

Loading...

**Physics Forums - The Fusion of Science and Community**