Matlab Crashes when I run the program

Please provide more information, see https://psychtoolbox.discourse.group/t/posting-guidelines/3058

Also, what do you mean by crash? Does the whole matlab close or just the screen that opened? Your log seems to suggest a lot your code ran. Please run some of the demos that come with PTB. Do they work fine?