Main Content



Display or return formatted version of message


show(msg) displays the whole message in the Command Window, including the Header and Body properties. If Body contains binary data that cannot be converted to characters, then the method displays a message indicating the length of the data in bytes.

Use this syntax for diagnostics or debugging.


show(msg,maxlength) displays the first maxlength characters of Body. If Body is longer than maxlength characters, then the method displays the total length of the data.

str = show(___) returns a string containing the information to be displayed, and can include any of the input arguments in previous syntaxes.

Input Arguments

expand all

Message, specified as a object or vector of Message objects.

Number of bytes, specified as an integer to convert.


expand all

Display the first 100 characters only of the body of a message from MATLAB displays text indicating the total number of characters in the message body.

request =;
uri ='');
r = send(request,uri);
HTTP/1.1 200 OK
Date: Mon, 02 Oct 2017 12:55:05 GMT
Server: Apache/2.2.15 (CentOS)
Host-ID: wcxm4
X-Content-Type-Options: nosniff
Last-Modified: Sun, 01 Oct 2017 16:57:27 GMT
ETag: "f4b6"
Accept-Ranges: bytes
Cache-Control: max-age=14400
Expires: Mon, 02 Oct 2017 16:55:05 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 9500
Content-Type: text/html; charset=UTF-8
Connection: close

<!DOCTYPE html>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-w

<< 62581 total characters of text/html UTF-8 data >>

Version History

Introduced in R2016b