MATLAB Examples

Utilize .NET Objects in MATLAB

This is a simple demonstration to highlight making use of .NET Assemblies directly in MATLAB.


Our current location

City = 'Boston, Massachusetts';

Add the .NET assembly we are going to need


Create and use a SpeechSynthesizer object

set the rate and volume properties and call the speak method

speaker = System.Speech.Synthesis.SpeechSynthesizer();
speaker.Rate = 1;
speaker.Volume = 100;
speaker.Speak(['Hello, ', City, '!']);