<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>How to use a variable in the piecewise command</title>
		<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command</link>
		<description>Posts in the discussion thread &quot;How to use a variable in the piecewise command&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 14 Jun 2026 23:08:09 +0000</lastBuildDate>
		
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-12909016#post-4466619</guid>
				<title>Re: How to use a variable in the piecewise command</title>
				<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command#post-4466619</link>
				<description></description>
				<pubDate>Sun, 12 Jan 2020 06:02:54 +0000</pubDate>
				<wikidot:authorName>Trenly</wikidot:authorName>				<wikidot:authorUserId>1905506</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Not for the <a href="http://tibasicdev.wikidot.com/piecewise">piecewise(</a> command. The CE and CSE are a little different than the 83/34/+/SE</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-12909016#post-4466491</guid>
				<title>Re: How to use a variable in the piecewise command</title>
				<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command#post-4466491</link>
				<description></description>
				<pubDate>Sun, 12 Jan 2020 02:47:21 +0000</pubDate>
				<wikidot:authorName>QubicQuantum</wikidot:authorName>				<wikidot:authorUserId>6020574</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>wouldn't you need a Str&gt;Expr command?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-12909016#post-4464259</guid>
				<title>Re: How to use a variable in the piecewise command</title>
				<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command#post-4464259</link>
				<description></description>
				<pubDate>Thu, 09 Jan 2020 00:43:50 +0000</pubDate>
				<wikidot:authorName>ProfLisa</wikidot:authorName>				<wikidot:authorUserId>5931841</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Yes, this worked, thank you!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-12909016#post-4463667</guid>
				<title>Re: How to use a variable in the piecewise command</title>
				<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command#post-4463667</link>
				<description></description>
				<pubDate>Wed, 08 Jan 2020 04:55:15 +0000</pubDate>
				<wikidot:authorName>Trenly</wikidot:authorName>				<wikidot:authorUserId>1905506</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I'm doubtful it will work either, but looking at the example code on the command page, it looks like it is just storing a string into Y3, which is why I thought that concatenation may do the trick</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-12909016#post-4463662</guid>
				<title>Re: How to use a variable in the piecewise command</title>
				<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command#post-4463662</link>
				<description></description>
				<pubDate>Wed, 08 Jan 2020 04:39:31 +0000</pubDate>
				<wikidot:authorName>Myles_Zadok</wikidot:authorName>				<wikidot:authorUserId>2935702</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I would try <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/trenly" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1905506&amp;amp;size=small&amp;amp;timestamp=1696958095" alt="Trenly" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1905506)" /></a><a href="http://www.wikidot.com/user:info/trenly" >Trenly</a></span>'s suggestion, but I don't think that will work (please let me know if it does in fact work), because conditionals are a mixture of variables and conditional operators. The calculator does not seem to read the expressions the way it reads a string. The only work around I can think of would be to use a menu(s) to give the user the ability to select the desired conditional parameters.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-12909016#post-4463387</guid>
				<title>Re: How to use a variable in the piecewise command</title>
				<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command#post-4463387</link>
				<description></description>
				<pubDate>Tue, 07 Jan 2020 20:02:38 +0000</pubDate>
				<wikidot:authorName>Trenly</wikidot:authorName>				<wikidot:authorUserId>1905506</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>You could try string concatenation</p> <blockquote> <p>“piecewise(Y1,”+Str1+”,Y2,”+Str2→Y3</p> </blockquote> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-12909016#post-4463311</guid>
				<title>Re: How to use a variable in the piecewise command</title>
				<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command#post-4463311</link>
				<description></description>
				<pubDate>Tue, 07 Jan 2020 17:25:54 +0000</pubDate>
				<wikidot:authorName>ProfLisa</wikidot:authorName>				<wikidot:authorUserId>5931841</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The first piece of code is<br /> piecewise(Y1,X≥0,Y2,X&lt;0→Y3</p> <p>This shows the conditions as being hard-coded values, not variables. I would like to do this:<br /> piecewise(Y1,Str1,Y2,Str2)</p> <p>I'm not sure you read my post completely.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-12909016#post-4462624</guid>
				<title>Re: How to use a variable in the piecewise command</title>
				<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command#post-4462624</link>
				<description></description>
				<pubDate>Mon, 06 Jan 2020 21:03:16 +0000</pubDate>
				<wikidot:authorName>Trenly</wikidot:authorName>				<wikidot:authorUserId>1905506</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>—Thread Moved</p> <p>The <a href="http://tibasicdev.wikidot.com/piecewise">piecewise( command page</a> shows how to do this in its first section of code</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://tibasicdev.wikidot.com/forum/t-12909016#post-4462604</guid>
				<title>How to use a variable in the piecewise command</title>
				<link>http://tibasicdev.wikidot.com/forum/t-12909016/how-to-use-a-variable-in-the-piecewise-command#post-4462604</link>
				<description></description>
				<pubDate>Mon, 06 Jan 2020 20:20:41 +0000</pubDate>
				<wikidot:authorName>ProfLisa</wikidot:authorName>				<wikidot:authorUserId>5931841</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I am writing a program that would allow the user to input two functions and two intervals and then graph the piecewise defined function.</p> <p>:&quot;piecewise(Y1, X≤0, Y2,X&gt;0)”→Y3<br /> :DispGraph</p> <p>works fine but I would like to replace the &quot;X≤0&quot; and &quot;X&gt;0&quot; with string inputs. However this results in a data type error. Any suggestions?</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>