Home Forums GENERAL Matlab, Optisystem Reply To: Matlab, Optisystem

#47651

Hi Dhanush,
attached is a webinar explain how to link matlab to OptiSystem.

for converting string to binary and back in matlab ; here is some commands that you can adapt and use.

//////matlab code is below////
s = ‘Mary had a little lamb’; % this is a string input. it might be your pic or any data
binary = reshape(dec2bin(s, 8).’-‘0′,1,[]) % convert string to binary command
str = char(bin2dec(reshape(char(binary+’0′), 8,[]).’)) % convert binary back to string to be used at the end of the program
////end of matlab code////////

Hope that help you in your project
thanks
Mohamed Abouseif

Categories