![]() If you install the Image Processing Toolbox (IPD) you will have a MaskFilter function to do this 2D intercorrelation. This pattern can be thought as a "filter" kernel, which is a common way to modify images with a linear filter matrix. It seems to me that you want to compute a 2D intercorrelation of your heat field and a certain diffusion pattern. Any ideas on how to make it faster appreciated. ![]() Now my question is - is it necessary to do all this using for loops? Is there any built-in aggregate function in Scilab, that will let me do this for all elements of a matrix? The reason I haven't found a way yet, is that the result for every point depends on the values of other matrix points, and that made me do it with nested loops. Up to 50x50 plate, it all happens in a reasonable, 4-5 seconds time frame. Which takes quite a long time, and I'd like to avoid it. If I'd like to observe that for, say 100 secons, with a 1 s step, I have to repeat it 100 times, giving 960,400 iterations in total. The problem is, that, if I'd like to do it for a 100x100 points plate, it means, that here (it's only for inner part, without boundary conditions), I would have to loop 98x98 = 9604 times, at every turn calculating the heat at a given i,j point. ![]() ![]() Now, the crucial point of it, is calculation of temperature for all plate points, and it has to be done for every time instance I want to observe: for j=2:S-1 For this purpose, I've wrote a Scilab script. I'm trying to simulate the heat distribution on an infinite plate over time. ![]()
0 Comments
Leave a Reply. |