Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
PLUGIN UPDATED SMath Studio 0.97.5346 and later- SS-2315: cases() doesn't allow creating third row; - cases(3) used by default instead of cases(1); |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
PLUGIN UPDATED SMath Studio 0.98.5952 Nightly Build only
Please note: if you have it, update of Custom Glyphs plugin is mandatory to make everything working fine (hidden functions removed, no more interactions between these plugins since this SS version)
- now it is possible to delete placeholders; - adding placeholders now is "one-by-one" -> will be displayed a non-working cases() when you add or delete a placeholder; |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
Davide, could you plese update the cases() function to work with units on the RHS? Hugely usefull when integrating piecewise physical properties. Thank you! CasesUnitBug.sm (4kb) downloaded 98 time(s).Edited by user 16 May 2016 23:26:46(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Alex, the 1st condition in your cases() is wrong in both the functions. You are using 1*'m≤x≤5*'m that bracketed it is (1*'m≤x)≤5*'m; this obviously fails because when you insert 2'm, the result is (1)≤5*'m, hence the "units don't match" error; note that in the 2nd case the error is silent (you will have always 0≤5 or 1≤5). If you want to have the ternary operator for readability, use lele(...) from the same plugin, that does the job in the right way for you (lele(B,A,C)=(A≤B)&(B≤C)). Edited by user 17 May 2016 01:57:32(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
PLUGIN UPDATED SMath Studio 0.98.5973 Nightly Build only - added image2rgb() / image2rgba(); |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,985 Was thanked: 1124 time(s) in 721 post(s)
|
The function at() seems to have a problem similar to those observed in the maxima plugin. atproblem.sm (5kb) downloaded 60 time(s). |
|
1 user thanked mkraska for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
I prefer the compactum style.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi. I guess that args for cases must to be unevaluated, like those if statements above. That's not only for errors, also for improve the speed of cases, which seems to eval all options before give the answer. Best regards. Alvaro.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 17/01/2013(UTC) Posts: 296 Location: Khabarovsk, Russia Was thanked: 151 time(s) in 107 post(s)
|
Originally Posted by: Razonar Hi. I guess that args for cases must to be unevaluated, like those if statements above. That's not only for errors, also for improve the speed of cases, which seems to eval all options before give the answer. I suppose you may want to vote for SS-2316. |
Best regards, Mike Kaganski |
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Razonar Hi. I guess that args for cases must to be unevaluated I can't comment wrt your actual version. "cases" does not come with OFFicial 5346, but is available with the UNofficial 5346. The gorgeous application [made work by Davide] is the convolution. I tried "cases" in other work sheets and failed. I toke the plunge to install 5935 ... that killed most of 5346 work sheets. More nightly build, more incompatibility and less projects working. Not enough collabs publish working projects. Jean
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
... there is more to test: as is, 5346 X_Y plot does not support "if/else". What about plotting some discontinuous from your prefered nightly build ?
Jean
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: mikekaganski I suppose you may want to vote for SS-2316. I see: Yep. Alvaro.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Originally Posted by: mkraska The function at() seems to have a problem similar to those observed in the maxima plugin. Thank you Martin, I'll work on it ASAP. Originally Posted by: Razonar Hi. I guess that args for cases must to be unevaluated, like those if statements above. That's not only for errors, also for improve the speed of cases, which seems to eval all options before give the answer. As mentioned by Mike, this is addressed under SS-2316. As for now to evaluate only the function for the target condition you have to use eval() inside functions or numerical optimization outside functions. I can't reproduce the first error shown in your picture, what plugin version are you running and in what SMath Studio? Edited by user 30 May 2016 11:03:56(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: Davide Carpi I can't reproduce the first error shown in your picture, what plugin version are you running and in what SMath Studio?
Hi Davide. In the attached, with background are all errors "division by zero" cases_error.sm (99kb) downloaded 64 time(s).in version 0.98 b5935 (last stable build, as I understand). Plugin version 1.1.5947.155599 Best regards.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Originally Posted by: Razonar Hi Davide. In the attached, with background are all errors "division by zero" cases_error.sm (99kb) downloaded 64 time(s).in version 0.98 b5935 (last stable build, as I understand). Plugin version 1.1.5947.155599 Thank you, I can reproduce. This is before the SS-2318 implementation. In this case, you have to switch the optimization to numeric (symbolic uses the boolean sum and SMath ignores that x is a function's argument). If the function is behind a line, you have to wrap it in a eval(). Edited by user 31 May 2016 11:34:38(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
PLUGIN UPDATED SMath Studio 0.98.5990 Nightly Build only- fixed at(2) at(3); - Unknowns now skips the "iterator" argument of diff/int/sum/product functions; Edited by user 08 June 2016 10:35:36(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
2 users thanked Davide Carpi for this useful post.
|
on 08/06/2016(UTC), on 08/06/2016(UTC)
|
|
Rank: Member Groups: Registered
Joined: 18/05/2010(UTC) Posts: 27 Was thanked: 13 time(s) in 6 post(s)
|
Hello Davide Sorry to be thick but I need some help with the cases function. When I type case( or enter cases from the Insert Function… menu, only two lines are placed on the worksheet: http://smath.info/wiki/G...2fcases_if_otherwise.pngand I don't know how to add extra if cases. I've tried dragging corners, as for adding array rows, but with no success. How can I add more cases? Smath: 0.98.5997 Custom Functions: 1.1.5981.13453 Custom Glyphs: 1.1.5973.13108 Many thanks Brian
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi bdrunagle. Try to write , (or ; if you have this as separator) inside the placeholder of cases. This give you the new extra lines. But be carefull, after inserted, can't be deleted. (Must to copy and paste to new one cases).
Best regards.
Alvaro.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Originally Posted by: Razonar Hi bdrunagle. Try to write , (or ; if you have this as separator) inside the placeholder of cases. This give you the new extra lines. Correct Originally Posted by: Razonar But be carefull, after inserted, can't be deleted. (Must to copy and paste to new one cases).
Since some nightly build it is possible (the cost is that you cannot insert a line at once, you have to press the argument separator twice) |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: Davide Carpi
Since some nightly build it is possible (the cost is that you cannot insert a line at once, you have to press the argument separator twice)
That's seems a very cheap price. Best regards. Alvaro.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.