how do i bold certain characters in a vector?
5 ビュー (過去 30 日間)
古いコメントを表示
I am trying to bold an i,j, and k for vector equations. How can I do this using fprintf?
p=[-1,7,-3]; v=[5,12,-7];
syms t
vec=p+t*v
fprintf('The vector equation for the line is %si+%sj+%sk\n and the parametric equations are x= %s,\ny= %s, z=%s',vec,vec)
thanks!
0 件のコメント
回答 (1 件)
Steven Yeh
2018 年 6 月 19 日
You can try Element Style tag:
fprintf(['The vector equation for the line is %s', ...
['<strong>i</strong>'], ...
'+%s', ...
['<strong>j</strong>'], ...
'+%s', ...
['<strong>k</strong>'], ...
'\n and the parametric equations are x= %s,\ny= %s, z=%s\n'],vec,vec)
This can bolden the three characters: i, j, k
2 件のコメント
Stephen23
2018 年 6 月 20 日
Note that this feature is NOT documented, so use it at your own risk!
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!