- I have not seen the syntax "while if ..." and I don't believe that is correct.
- you used the return keyword but your code is not a function (to my knowlage)
- you have nothing but "goto(x)" in your while loop thus if the condition is true it will interate forever
- As another person metioned b, c and d are "0" because 0 times anything is still 0 : (b =0*rand(1,10); c = 0*rand(1,10); d = 0*rand(1,10)) (not a copy and paste error) this means that you will never execute the while loop.
- there is not a "goto" function in matlab. if this is a custom function please add the code for it.
- once you get to the last interation of the for loop (if I understand what your doing) you will get "index exceeds array bounds" error because some arrays are indexed with "i+1"
- Upload the goto function code
- better explain what the goal of the code is (what are you using it for)
- explain the need for the while loop
- explain what you were trying to do with the return keyword