Using sendmail how can I send the value that are stored in the workspaces explain me with an example

I am using "sendmail" in matlab after "setpref" I need to attach the matrix values that have been calculated and stored in the workspace I need to send them to another person someone please help me to send the workspace values to another person using "sendmail" with an example

 Accepted Answer

Use save() to save the contents of the workspace to a *.mat file. Then include the *.mat file as an attachment using sendmail().
Example:
save SeansWorkspace.mat;
sendmail('someone@somewhere','Hello World','See attached','SeansWorkspace.mat');

More Answers (2)

If you you have one matrix you can send your matrix as a text message
a=rand(4)
message=cellstr(num2str(a))
sendmail({his_address,your_adress},'Object',message)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!