From: SourceForge.net <no...@so...> - 2006-03-16 07:15:22
|
Bugs item #1450722, was opened at 2006-03-15 21:40 Message generated for change (Comment added) made by agarate You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1450722&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: Fix for 5.9.2 Status: Closed Resolution: Wont Fix Priority: 5 Submitted By: Araceli Gárate GarcÃa (agarate) Assigned to: Nobody/Anonymous (nobody) Summary: operatorp(expr,derivative) Initial Comment: Hi, the problem is that i need to identify when a derivative is present. (%i211) m:diff(x(t),t); d (%o211) -- (x(t)) dt (%i212) op(m); (%o212) derivative (%i213) if op(m)=derivative then(disp(hi)); (%o213) false (%i214) if op(m)="derivative" then(disp(hi)); (%o214) false (%i215) if op(m)=diff then(disp(hi)); (%o215) false (%i216) if op(m)='derivative then(disp(hi)); the operatorp(m,derivative) doesn't work either. Thanks in advance Araceli Gárate ga...@ci... ---------------------------------------------------------------------- >Comment By: Araceli Gárate GarcÃa (agarate) Date: 2006-03-16 07:15 Message: Logged In: YES user_id=1426135 Thank you very much for your quickly answer. ---------------------------------------------------------------------- Comment By: Robert Dodier (robert_dodier) Date: 2006-03-16 06:21 Message: Logged In: YES user_id=501686 Try this -- is (op(m) = nounify(derivative)); if (op(m) = nounify(derivative)) then <do something>; The problem is that the derivative expression constructed by diff is a so-called "noun". You have to explicitly make a noun symbol with nounify, otherwise 'derivative is a verb symbol. Hope this helps, and closing this report as a non-bug. Robert Dodier ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1450722&group_id=4933 |