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**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matrix Output (Matlab)

Loading...

Similar Threads - Matrix Output Matlab | Date |
---|---|

Eigenvectors 4x4 Matrix in Mathematica | Aug 26, 2017 |

LaTeX Vertical line in matrix | Feb 23, 2017 |

How do I extract elements of a random matrix masked by a circle with its center at A(15,26) | Sep 15, 2016 |

MATLAB-output values matrix | Aug 23, 2014 |

Matrix as an output of a function | Jun 21, 2011 |

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