How to use disp in matlab?

16 次查看(过去 30 天)
disp('Solutions for f''(x) = 0:');
Solutions for f'(x) = 0:
Dear friend, I have some trouble with disp. why in the above code, the result is Solutions for f'(x) = 0:
how to display f''(x) using disp
Your help would be highly appreciated!

采纳的回答

Walter Roberson
Walter Roberson 2023-9-11
disp('Solutions for f''''(x) = 0:');
Solutions for f''(x) = 0:
disp("Solutions for f''(x) = 0:");
Solutions for f''(x) = 0:
That is, inside a ' ' (apostrophe) delimited character vector, a single ' ends the character vector and '' (two ' in a row) results in a single ' in the character vector.
Inside a " " (double-quote) delimited character vector, each ' is literal, just a plain character -- but a single " (double-quote) ends the string and "" (two double-quote in a row) results a single " in the string.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Argument Definitions 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by