for loop double dots - Сообщения

How do you get the "double dots" in the for loop definition?
WroteHow do you get the "double dots" in the for loop definition?
From the palette as you did or range(2)
Are you attempting to create an f(x,y) in matrix table ?
Another story of no difficulty. I'm asking the question
as you just joined the Smath community.
Cheers
These two are just a taste.
Utilities Matrix Delta.sm (33 КиБ) скачан 49 раз(а).
Utilities Matrix [Times, Dia, Mirror,Euclid].sm (66 КиБ) скачан 54 раз(а).
A peculiar thing happened to me with your second file and the recent SMath (Win 10 32bit). It just do not stops calculating and I do not have a clue what is going on. Here is the screenshot:
I Do not know where did it stop (see the blue line at the slider, the red square is wrt diagonal of nonsquare matrix error diag2vec() function). There is no green border around any region as well.
Blue slider stopped there and and after about 40 min SMath crashed.
Does anyone can reproduce this? If so, there must be a recently introduced bug then (with for loops maybe).
Regards,
Radovan
EDIT: Actually, it did well when I put the Optimization Numeric to all regions, except to the diag2vec() function
WroteBlue slider stopped there and and after about 40 min SMath crashed.
Hello Radovan,
The little red square in both snippets point to the module diag2vector(M)
One of them [the second one] that was coded for error"matrix must be square"
it created a "critical error occurred" ... remove this module as in fact it
is useless and the definition incomplete. It must be coded
out:= error"matrix must be squared".
On the other hand, I noticed that your version brackets the range in program
it converts 1..n => [1..n] why brackets is it associated to specific features
wrt some of the latest version(s). ???
The function mirror(M) has a much simpler expression.
The three attached work fine after some doctoring. If your Smath crashes again,
must be examined more closely.
Jean
Utilities Matrix [Times, Dia, Mirror,Euclid].sm (28 КиБ) скачан 49 раз(а).
Utilities Matrix Delta.sm (33 КиБ) скачан 38 раз(а).
Utilities Most used [2D f(x,y)].sm (13 КиБ) скачан 39 раз(а).
These files worked just fine, thank you. The problem with your previous file is due to the SMath problematic and frustrating behavior related to symbolic-numeric. I do not know what was the reason of that wrt to your file - most of the time I do not know actually. I did what I do when this happen - revert to numeric optimization hopping the things will get fixed.
Regarding the brackets [1..n] this is due to Integration with microMathematics plus
Regards,
Radovan
WroteI Do not know where did it stop (see the blue line at the slider, the red square is wrt diagonal of nonsquare matrix error diag2vec() function). There is no green border around any region as well.
There are several methods can be used to detect where is the issue:
1) See what region has green border. In this case it will not work because of black background set for some regions (it is hard to see green border for regions with black background).
2) Press Pause button on the toolbar (usually it will show an exact region where calculation currently in progress). In this case it will not work as issue is inside of the plug-in.
3) Hover the progressbar by mouse to see tooltip like "64 of 67 regions processed", which means that issue is in the next evaluable region after 64. In our case one can see that issue is at the end of the worksheet.
4) Press Interrupt processing toolbar button to see what region will be marked as red (approximate place will be also shown on the vertical scrollbar).
So, using (3) and (4) one can see issue is in N:Scale(N,0,255).
Hope this will help to make investigations in future.
Best regards.

I suspected that the problem must be at somewhere at the end (but deliberately did not want to change anything in the worksheet). The simplest for me, and maybe for other users, was to make the regions Optimization->Numeric - in most cases when SMath get stuck, it helps. If that did not work I will definitely see where the problem was (in spite of rather hard to notice green borders in the black background regions).
Regards,
Radovan
WroteI suspected that the problem must be at somewhere at the end (but deliberately did not want to change anything in the worksheet). The simplest for me, and maybe for other users, was to make the regions Optimization-
NO, Radovan:
The first work sheet was incompletely coded error("Matrix must be square")
created the critical error ... out:=error("matrix must be square") is OK code
however useless, thus remove. It has nothing to do with Scale(N,0,255).
Scale(M,lo,hi) is always Symbolic wrt min(,) max(,)
Better use new name to define image:=Scale(N,0,255)
Why should MicroMathematics change the programming style, unless it will
had some miraculous features that the actual programming code can't.
As it looks it will depend again upon some Maxima goodies not delivered
with an eventual stable Smath version.
Jean
WroteWroteI suspected that the problem must be at somewhere at the end (but deliberately did not want to change anything in the worksheet). The simplest for me, and maybe for other users, was to make the regions Optimization-
NO, Radovan:
The first work sheet was incompletely coded error("Matrix must be square")
created the critical error ... out:=error("matrix must be square") is OK code
however useless, thus remove. It has nothing to do with Scale(N,0,255).
Scale(M,lo,hi) is always Symbolic wrt min(,) max(,)
Better use new name to define image:=Scale(N,0,255)
My objection was about lenghtly calculation in SMath. The point was, what to do in this situation like on the picture
Waiting such a long time is pointless (it did not stop, as one can see). What to do in the case when you are quite sure that the calculation should not take such a long time? My only answer would be to turn optimization numeric (or use eval()) and see what happened. If this helped, that's OK. If not, try to change something or give it up.
WroteWhy should MicroMathematics change the programming style, unless it will
had some miraculous features that the actual programming code can't.
As it looks it will depend again upon some Maxima goodies not delivered
with an eventual stable Smath version.
I really do not know. I hope something will come up into a positive direction for both projects.
Regards,
Radovan
Regards,
Radovan
WroteJean, Yes it does work fine. What was the catch?
There is no catch Radovan !
The very first work sheet you had was incompletely coded.
it should have been coded out:=error("matrix must be square")
The definition out:= was missing ... creating a "critical error"
Consequently => never stopped and/or crash
This module was finely useless, zap it.
Have a better day now
-
Новые сообщения
-
Нет новых сообщений