My objective is to solve a composite laminate problem by iterat. Currently, I am working on finding an optimal solution that satisfies certain conditions. I would greatly appreciate some assistance. while (userinput 256 & userinput 128 & userinput 64) prompt Please enter one of the listed gray levels (256, 128, 64, 32, 16, 8, 4, 2). You can use it for multiple conditions in your while loop. I can't tell what you're doing because I don't have t, index or coverage. Once you really understand how that works, you can re-implement the logic you need in a way compatible with this framework. Learn more about loop, for, while loop, matlab, matrix MATLAB. 1 Answer Sorted by: 2 The symbol & is the and logical operator. Generally speaking you can convert while coverage (j+index+1)0 & j+index+1same concern would go for your other input, Vout as well. In MATLAB, a while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The difference is that while loops check the condition at the beginning of the loop while do while loops check the condition at the end of the loop. Probably you want the while loop to wrap whatever obtains the value, if you then still use a function at all, you would call it once per iteration of the while loop (it's possible that however this is hooked up in your software package would already effectively do that by continuously re-executing your function - ie, the mistake may be having your own while loop at all) 25 Link Translate Edited: MathWorks Support Team on There is no 1-to-1 correspondence to the C++ do while loop in MATLAB. You are going to have rethink the whole design of your program such that it can actually become aware of changes in the value of whatever tin represents. DO WHILE, EXIT, CYCLE, and END DO statements INCLUDE statement IMPLICIT NONE. In the while loop, k never increases so it is an infinite loop. Tin is an argument to your function, as a result, it cannot change value during a call to the function, and the condition for loop termination cannot be satisfied, unless it was from the very beginning. These features would eventually be incorporated into the Fortran 90 standard. Open the MATLAB Function block code, click 'edit data' to see if there is anything obvious regarding the data types of the parameters and signals.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |