About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • License: Freeware
  • Last update: 6 years ago
  • Total downloads: 69
  • Price: Free |
  • Operating system: Linux, Mac OS X, Win All, BSD, Solaris
  • Publisher: Stefan Novak
See full specifications

scripts default iconText message / E-mail Matlab! (Scripts) Publisher's description

Have you ever had a need to invert a matrix while out for dinner? Have you ever had the need to solve a second-order differential equation while stuck in traffic but didn't have access to Matlab? Well, now you can!

Have you ever had a need to invert a matrix while out for dinner? Have you ever had the need to solve a second-order differential equation while stuck in traffic but didn't have access to Matlab? Well, now you can!

This is a VBA module file (*.bas) that allows you to evaluate a string in Matlab by calling the Matlab interface. In order to get it fully functional, you have to integrate it with Microsoft Outlook by using the following steps:

Step 1) Make a Gmail account of your choice.
Step 2) Add the Gmail account to Microsoft Outlook via Gmail's IMAP interface.
Step 3) Open the Visual Basic Editor. (Alt-F11)
Step 4) Add the Matlab Server Automation... Reference. (Tools > References)
Step 5) Double click the ThisOutlookSession module in the Project window.
Step 6) In the left pull-down menu for the module window, select Application. In the right pull-down menu, select NewMailEx.
Step 7) You have to use a function that (safely) bypasses some of VBA's security dialogs. Use the following code for NewMailEx:

Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim iMsg, iConf, Flds
Dim varEntryIDs
Dim objItem
Dim i As Integer
Dim matlabStr As String

Dim strID As String
Dim olNS As Outlook.NameSpace
Dim olMail As Outlook.MailItem

Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

schema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(schema & "sendusing") = 2
Flds.Item(schema & "smtpserver") = "smtp.gmail.com"
Flds.Item(schema & "smtpserverport") = 465
Flds.Item(schema & "smtpauthenticate") = 1
Flds.Item(schema & "sendusername") = "your.gmail.user.name@gmail.com"
Flds.Item(schema & "sendpassword") = "your.gmail.password"
Flds.Item(schema & "smtpusessl") = 1

varEntryIDs = Split(EntryIDCollection, ",")

For i = 0 To UBound(varEntryIDs)

strID = varEntryIDs(i)
Set olNS = Application.GetNamespace("MAPI")
Set olMail = olNS.GetItemFromID(strID)

matlabStr = EvalStrInML(olMail.Body)
matlabStr = Replace(matlabStr, Chr(10), "

With iMsg
.To = olMail.SenderEmailAddress
.From = "Your Name <your.gmail.user.name@gmail.com>"
.Subject = "Matlab Results"
.HTMLBody = "
" & ">> " & olMail.Body & "
" & matlabStr
.Sender = "Your Name"
.Organization = ""
.ReplyTo = "your.gmail.user.name@gmail.com"
Set .Configuration = iConf
SendEmailGmail = .Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing


Set olMail = Nothing
Set olNS = Nothing
End Sub

Step 8) Right-click the Modules folder on the Project panel and click Import File. Select the *.bas file EvalStrInML.bas file.

Step 9) Change your Send/Receive settings to check for e-mail every 1 minute.

You should be good to go! Any e-mails that gets sent to your.gmail.user.name@gmail.com will show up in your Outlook account. When they do, Outlook will parse the body of the e-mail and send it over to Matlab for evaluation. Outlook then takes the results and sends an e-mail back out through your Gmail account.

Here's an example:

From: Stefan Novak <*********@gmail.com>
To: My Matlab Email Interface <*********@gmail.com>
Subject: Let's try a test!
Body: inv([5,8,2;4,10,2;9,3,7])

The reply:

From: My Matlab Email Interface <********@gmail.com>
To: Stefan Novak <*********@gmail.com>
Subject: Matlab Results
>> inv([5,8,2;4,10,2;9,3,7])

ans =

0.7619 -0.5952 -0.0476
-0.1190 0.2024 -0.0238
-0.9286 0.6786 0.2143

Note: This also works with text messages (as long as your phone is capable of text messaging e-mail address.)

System Requirements:

MATLAB 7.7 (R2008b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

Text message / E-mail Matlab! (Scripts) Tags:

Click on a tag to find related softwares

Is Text message / E-mail Matlab! (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.