How to loop through values?
Let’s say I have 11 values of beta, evenly-spaced with linspace( ). And let’s say for each value of beta, I want to compute some things for a range of alpha values using alpha = linspace( ). How can I best do this? Currently, I do something tedious: I fix beta, run the code, press hold on in the Command Window, fix another value of beta, run code, press hold on, etc. I suspect there’s a better way to do this. Should I just write a for loop for beta = 0: 11 : pi? Thanks in advance.Let’s say I have 11 values of beta, evenly-spaced with linspace( ). And let’s say for each value of beta, I want to compute some things for a range of alpha values using alpha = linspace( ). How can I best do this? Currently, I do something tedious: I fix beta, run the code, press hold on in the Command Window, fix another value of beta, run code, press hold on, etc. I suspect there’s a better way to do this. Should I just write a for loop for beta = 0: 11 : pi? Thanks in advance. Let’s say I have 11 values of beta, evenly-spaced with linspace( ). And let’s say for each value of beta, I want to compute some things for a range of alpha values using alpha = linspace( ). How can I best do this? Currently, I do something tedious: I fix beta, run the code, press hold on in the Command Window, fix another value of beta, run code, press hold on, etc. I suspect there’s a better way to do this. Should I just write a for loop for beta = 0: 11 : pi? Thanks in advance. for loop MATLAB Answers — New Questions