📄 splitstr.mht
字号:
From: <Saved by Windows Internet Explorer 7>
Subject:
Date: Tue, 12 May 2009 09:59:51 -0700
MIME-Version: 1.0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.mece.ualberta.ca/Courses/mec390/390code/splitstr.m
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.6000.16825" name=3DGENERATOR></HEAD>
<BODY><PRE>% example on splitting long format strings in Matlab fprintf =
statements
variable1 =3D 2;
variable2 =3D 4;
variable3 =3D 8;
% a usual short format string...
fprintf('v1: %f, v2: %f, v3: %f\n', variable1, variable2, variable3);
% a split, very long format string...
fprintf(['This is a long string that',...
' will have to be split!',...
' Here are the variables: ',...
' variable1: %f, variable2: %f,',...
' variable3: %f\n\n'], variable1,...
variable2, variable3);
%
% Three things to note here:
%
% 1) to break up a long format string, you require the format string to
% delimitted as ['format string'] instead of just 'format string'
%
% 2) you require a ",..." at the end of each split line
%
% 3) you can break up both the format string and the variable list
%
</PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -