<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Newline.m</id>
	<title>Newline.m - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Newline.m"/>
	<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Newline.m&amp;action=history"/>
	<updated>2026-04-20T14:15:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://wiki-pnb.eri.ucsb.edu/index.php?title=Newline.m&amp;diff=210&amp;oldid=prev</id>
		<title>128.111.101.185: Created page with '&lt;pre&gt; function new_string=newline(old_string) % function new_string=newline(old_string) %    % makes an array from a string which contains  % carriage returns (e.g., string=ls). …'</title>
		<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Newline.m&amp;diff=210&amp;oldid=prev"/>
		<updated>2010-08-05T23:48:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;pre&amp;gt; function new_string=newline(old_string) % function new_string=newline(old_string) %    % makes an array from a string which contains  % carriage returns (e.g., string=ls). …&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
function new_string=newline(old_string)&lt;br /&gt;
% function new_string=newline(old_string)&lt;br /&gt;
%   &lt;br /&gt;
% makes an array from a string which contains &lt;br /&gt;
% carriage returns (e.g., string=ls).  The&lt;br /&gt;
% array will be padded with blanks to insure that&lt;br /&gt;
% all rows have the same number of columns.&lt;br /&gt;
&lt;br /&gt;
if (abs(old_string(length(old_string)))~=10)&lt;br /&gt;
	old_string=[old_string,setstr(10)];&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
i=[0,find(abs(old_string)==10)];&lt;br /&gt;
&lt;br /&gt;
new_string=setstr(32*ones(length(i)-1,max(diff(i))-1));&lt;br /&gt;
&lt;br /&gt;
for string=1:(length(i)-1),&lt;br /&gt;
	start=i(string)+1; stop=i(string+1)-1;	len=stop-start+1;&lt;br /&gt;
	if (stop-start)&amp;gt;=1&lt;br /&gt;
		new_string(string,1:len) = old_string(start:stop);&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;[[newline]]&amp;lt;big&amp;gt;&lt;/div&gt;</summary>
		<author><name>128.111.101.185</name></author>
		
	</entry>
</feed>