Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I was wondering how you can get this to work in MatLab:

input is n

for i from 1 to n

x0 = 1

xi = x(i-1) + 2

So that for i = 1, x1 = x0 +2, or x1 = 1 + 2

Is there anyway to express this in MatLab?

Thanks!

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

# Matlab Question: variables that depend on previous variables

Loading...

Similar Threads - Matlab Question variables | Date |
---|---|

MatLab function question | Sep 5, 2015 |

Contour question in matlab | Feb 9, 2015 |

Concept and subject of latex and its usage and related questions on latex | Sep 25, 2014 |

Computing question 1st year Engineering-MATLAB | Apr 22, 2014 |

Matlab question: How to pick specific value from column vector | Jan 16, 2014 |

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