Method for initial guess of standard deviation of 2d gaussian/gabor? - curve-fitting

I'm working on curve fitting software in Matlab. So far it's going pretty well but I need a method of inputting an initial guess for my curve fitting software. I'm given a selection of points, but I need to find an initial guess of the SDx and SDy but I don't know how to do this. Is there anywhere I can learn a good approach to this? Thank you so much!
My data is a 32x32 matrix that looks something like the following:
-0.0027 -0.0034 -0.0034 0.0003 0.0018 0.0028 0.0058 0.0057 0.0008 -0.0053
-0.0023 -0.0008 -0.0007 0.0005 0.0015 0.0033 0.0062 0.0054 0.0029 -0.0029
-0.0018 0.0004 0.0014 0.0009 0.0006 0.0024 0.0047 0.0045 0.0041 0.0009
-0.0034 -0.0020 0.0022 0.0022 -0.0007 0.0003 0.0012 0.0024 0.0022 0.0015
-0.0053 -0.0042 -0.0004 0.0010 -0.0014 -0.0020 -0.0021 -0.0003 0.0002 -0.0014
-0.0070 -0.0034 -0.0008 0.0000 0.0004 0.0032 0.0011 0.0019 0.0026 0.0006
-0.0054 -0.0016 0.0005 0.0012 0.0000 0.0045 0.0033 0.0035 0.0039 0.0013
-0.0050 -0.0015 -0.0009 0.0001 0.0001 0.0013 -0.0022 -0.0010 0.0012 -0.0024
-0.0044 -0.0028 -0.0019 0.0016 0.0026 -0.0005 -0.0057 -0.0057 -0.0042 -0.0057
-0.0037 -0.0022 -0.0024 0.0003 0.0036 0.0002 -0.0045 -0.0055 -0.0039 -0.0032
-0.0045 -0.0012 -0.0016 -0.0016 0.0000 0.0003 -0.0018 -0.0014 0.0025 -0.0015
-0.0047 -0.0028 -0.0028 -0.0021 -0.0041 -0.0025 -0.0008 0.0011 0.0020 -0.0029
-0.0028 -0.0020 -0.0024 -0.0024 -0.0044 -0.0060 -0.0032 0.0009 0.0018 -0.0008
-0.0005 -0.0017 0.0007 0.0025 -0.0020 -0.0030 -0.0010 -0.0011 -0.0004 0.0014
-0.0011 -0.0006 -0.0001 0.0003 -0.0002 0.0012 0.0033 0.0010 -0.0025 -0.0001
-0.0032 -0.0008 0.0001 -0.0039 -0.0022 0.0003 0.0016 0.0016 -0.0009 -0.0008
-0.0060 -0.0019 -0.0005 -0.0033 -0.0039 -0.0032 -0.0018 -0.0004 -0.0012 -0.0004
-0.0077 -0.0049 -0.0039 -0.0039 -0.0049 -0.0044 -0.0039 -0.0047 -0.0034 -0.0031
-0.0054 -0.0026 -0.0030 -0.0046 -0.0071 -0.0048 -0.0028 -0.0051 -0.0046 -0.0042
-0.0049 0.0002 0.0009 -0.0017 -0.0041 -0.0031 -0.0018 -0.0024 -0.0029 -0.0015
-0.0032 -0.0007 0.0021 0.0012 -0.0006 -0.0013 -0.0008

Related

Radix Sort Convert Ascending to Descending (Pascal)

*edit
I have radix sort procedure, and i got this code on another site referension. But this radix sort only for ascending not for descending.
Can you guys help me how to make it to descending
Program SortStuff;
Uses Crt, Dos;
Type
AType = Array [1..400] of Integer;
Ptr = ^Node;
Node = Record
Info : Integer;
Link : Ptr;
end;
LType = Array [0..9] of Ptr;
Var
Ran : AType;
MaxData : Integer;
and this section of the procedure of refill
Procedure Refill (Var A : AType; Var L : LType);
Var
I, J : Integer;
P : Ptr;
begin
J := 1;
For I := 0 to 9 do
begin
P := L [I];
While P <> Nil do
begin
A [J] := P^.Info;
P := P^.Link;
J := J + 1;
end;
end;
For I := 0 to 9 do
L [I] := Nil;
end;
This is the radix sort code
Procedure RadixSort (Var A : AType; MaxData : Integer);
Var
L : LType;
I,
divisor,
ListNo,
Number : Integer;
begin
For I := 0 to 9 do L [I] := Nil;
divisor := 1;
While divisor <= 1000 do
begin
I := 1;
While I <= MaxData do
begin
Number := A [I];
ListNo := Number div divisor MOD 10;
Insert (L, Number, ListNo);
I := I + 1;
end;
Refill (A, L);
divisor := 10 * divisor;
end;
end;
and this the main code
begin
ReadData (Ran, MaxData);
Writeln ('Unsorted : ');
WriteArray (Ran, MaxData);
RadixSort (Ran, MaxData);
Writeln ('Sorted : ');
WriteArray (Ran, MaxData);
readln;
end.
this is the result of the compiler when ascending
Unsorted :
7131 5110 638 7836 3809 1278 9577 7590 8244 5902 7610 4787 6809 1510 3564 3358 6411 995 4966 9800 5807 678 9174 9385 4146 1824 4869 9383 3638 2304 8130 1178 5102 2192 1739 1643 2965 7245 7050 2416 3778 5515 4395 3418 4869 9814 6073 5014 8501 210 3966 4891 8992 2882 5512 3775 799 9985 8189 4664 4360 241 7681 6235 7152 8032 8874 19 9253 1943 2049 8301 1848 9175 8698 6578 8111 4442 5157 8832 9848 6448 3881 2753 4100 1130 9516 4539 5515 9756 1047 3313 2937 575 8634 9439 8508 8 2596 3814 4996 5129 9810 1220 8242 7672 7342 1320 3195 7590 4342 5697 7866 2326 6726 3441 8276 6531 2211 6285 4492 9310 2155 2349 1396 9157 772 3984 1955 9417 7644 4814 90 7922 180 6536 7018 7411 263 3775 2014 2339 4064 6623 4173 4031 5979 4930 7654 4039 1531 4916 7357 8802 6935 6108 1580 3999 6225 2641 6330 6907 2584 3437 7753 8680 2192 4461 748 983 364 1695 197 8174 3128 104 4724 546 3826 7640 8669 4481 4763 599 2983 4433 92 8317 8102 413 91 1355 7456 4577 8442 26 8319 5010 1140 1232 1688 4080 4445 3548 5713 8391 4295 296 294 1477 8487 5823 9493 4528 434 2589 9499 6092 9784 6773 1907 9382 2203 3774 8438 8672 3290 3590 4540 2912 7308 9782 5615 8352 9456 5867 5657 218 6838 6294 3295 4741 5949 9369 8949 9672 5853 7054 855 3755 3113 4712 9043 3412 4546 2567 9934 2034 2007 1845 6466 2815 3012 498 5736 2487 881 6250 780 6817 7309 8503 9697 6149 7132 6936 5692 2757 6150 2705 1401 9272 4190 6116 8096 2386 2027 8913 7734 7318 4423 8439 7087 7995 8429 7139 818 1495 3284 2418 3295 5121 2989 5741 433 1905 5468 9828 8946 3179 7615 894 9766 2971 847 6450 4686 9597 4851 2080 7062 1956 2386 7476 1703 2738 3864 6491 7545 3046 1432 1050 3534 6054 5005 4862 9126 2877 1259 8613 1209 4982 236 9877 1697 4142 7484 2562 1554 8105 6483 3440 1462 8463 2006 7193 8316 281 6544 645 7043 2857 70 5525 6953 8924 7032 7593 4514 2192 8088 59 2861 4685 897 7319 3300 410 773 2147 9992 2985 8834 302 437 4323 6566 8357 9802 8257 7543 3607 1131 564 9474 9203 9127 575 708 7767
Sorted :
8 19 26 59 70 90 91 92 104 180 197 210 218 236 241 263 281 294 296 302 364 410 413 433 434 437 498 546 564 575 575 599 638 645 678 708 748 772 773 780 799 818 847 855 881 894 897 983 995 1047 1050 1130 1131 1140 1178 1209 1220 1232 1259 1278 1320 1355 1396 1401 1432 1462 1477 1495 1510 1531 1554 1580 1643 1688 1695 1697 1703 1739 1824 1845 1848 1905 1907 1943 1955 1956 2006 2007 2014 2027 2034 2049 2080 2147 2155 2192 2192 2192 2203 2211 2304 2326 2339 2349 2386 2386 2416 2418 2487 2562 2567 2584 2589 2596 2641 2705 2738 2753 2757 2815 2857 2861 2877 2882 2912 2937 2965 2971 2983 2985 2989 3012 3046 3113 3128 3179 3195 3284 3290 3295 3295 3300 3313 3358 3412 3418 3437 3440 3441 3534 3548 3564 3590 3607 3638 3755 3774 3775 3775 3778 3809 3814 3826 3864 3881 3966 3984 3999 4031 4039 4064 4080 4100 4142 4146 4173 4190 4295 4323 4342 4360 4395 4423 4433 4442 4445 4461 4481 4492 4514 4528 4539 4540 4546 4577 4664 4685 4686 4712 4724 4741 4763 4787 4814 4851 4862 4869 4869 4891 4916 4930 4966 4982 4996 5005 5010 5014 5102 5110 5121 5129 5157 5468 5512 5515 5515 5525 5615 5657 5692 5697 5713 5736 5741 5807 5823 5853 5867 5902 5949 5979 6054 6073 6092 6108 6116 6149 6150 6225 6235 6250 6285 6294 6330 6411 6448 6450 6466 6483 6491 6531 6536 6544 6566 6578 6623 6726 6773 6809 6817 6838 6907 6935 6936 6953 7018 7032 7043 7050 7054 7062 7087 7131 7132 7139 7152 7193 7245 7308 7309 7318 7319 7342 7357 7411 7456 7476 7484 7543 7545 7590 7590 7593 7610 7615 7640 7644 7654 7672 7681 7734 7753 7767 7836 7866 7922 7995 8032 8088 8096 8102 8105 8111 8130 8174 8189 8242 8244 8257 8276 8301 8316 8317 8319 8352 8357 8391 8429 8438 8439 8442 8463 8487 8501 8503 8508 8613 8634 8669 8672 8680 8698 8802 8832 8834 8874 8913 8924 8946 8949 8992 9043 9126 9127 9157 9174 9175 9203 9253 9272 9310 9369 9382 9383 9385 9417 9439 9456 9474 9493 9499 9516 9577 9597 9672 9697 9756 9766 9782 9784 9800 9802 9810 9814 9828 9848 9877 9934 9985 9992
then i tried to modify ListNo := Number div divisor MOD 10; and reverse it into ListNo := divisor div Number MOD 10; and the final result become to
Unsorted :
7131 5110 638 7836 3809 1278 9577 7590 8244 5902 7610 4787 6809 1510 3564 3358 6411 995 4966 9800 5807 678 9174 9385 4146 1824 4869 9383 3638 2304 8130 1178 5102 2192 1739 1643 2965 7245 7050 2416 3778 5515 4395 3418 4869 9814 6073 5014 8501 210 3966 4891 8992 2882 5512 3775 799 9985 8189 4664 4360 241 7681 6235 7152 8032 8874 19 9253 1943 2049 8301 1848 9175 8698 6578 8111 4442 5157 8832 9848 6448 3881 2753 4100 1130 9516 4539 5515 9756 1047 3313 2937 575 8634 9439 8508 8 2596 3814 4996 5129 9810 1220 8242 7672 7342 1320 3195 7590 4342 5697 7866 2326 6726 3441 8276 6531 2211 6285 4492 9310 2155 2349 1396 9157 772 3984 1955 9417 7644 4814 90 7922 180 6536 7018 7411 263 3775 2014 2339 4064 6623 4173 4031 5979 4930 7654 4039 1531 4916 7357 8802 6935 6108 1580 3999 6225 2641 6330 6907 2584 3437 7753 8680 2192 4461 748 983 364 1695 197 8174 3128 104 4724 546 3826 7640 8669 4481 4763 599 2983 4433 92 8317 8102 413 91 1355 7456 4577 8442 26 8319 5010 1140 1232 1688 4080 4445 3548 5713 8391 4295 296 294 1477 8487 5823 9493 4528 434 2589 9499 6092 9784 6773 1907 9382 2203 3774 8438 8672 3290 3590 4540 2912 7308 9782 5615 8352 9456 5867 5657 218 6838 6294 3295 4741 5949 9369 8949 9672 5853 7054 855 3755 3113 4712 9043 3412 4546 2567 9934 2034 2007 1845 6466 2815 3012 498 5736 2487 881 6250 780 6817 7309 8503 9697 6149 7132 6936 5692 2757 6150 2705 1401 9272 4190 6116 8096 2386 2027 8913 7734 7318 4423 8439 7087 7995 8429 7139 818 1495 3284 2418 3295 5121 2989 5741 433 1905 5468 9828 8946 3179 7615 894 9766 2971 847 6450 4686 9597 4851 2080 7062 1956 2386 7476 1703 2738 3864 6491 7545 3046 1432 1050 3534 6054 5005 4862 9126 2877 1259 8613 1209 4982 236 9877 1697 4142 7484 2562 1554 8105 6483 3440 1462 8463 2006 7193 8316 281 6544 645 7043 2857 70 5525 6953 8924 7032 7593 4514 2192 8088 59 2861 4685 897 7319 3300 410 773 2147 9992 2985 8834 302 437 4323 6566 8357 9802 8257 7543 3607 1131 564 9474 9203 9127 575 708 7767
Sorted :
7131 5110 7836 3809 1278 9577 7590 8244 5902 7610 4787 6809 1510 3564 3358 6411 4966 9800 5807 9174 9385 4146 1824 4869 9383 3638 2304 8130 1178 5102 2192 1739 1643 2965 7245 7050 2416 3778 5515 4395 3418 4869 9814 6073 5014 8501 3966 4891 8992 2882 5512 3775 9985 8189 4664 4360 7681 6235 7152 8032 8874 9253 1943 2049 8301 1848 9175 8698 6578 8111 4442 5157 8832 9848 6448 3881 2753 4100 1130 9516 4539 5515 9756 1047 3313 2937 8634 9439 8508 2596 3814 4996 5129 9810 1220 8242 7672 7342 1320 3195 7590 4342 5697 7866 2326 6726 3441 8276 6531 2211 6285 4492 9310 2155 2349 1396 9157 3984 1955 9417 7644 4814 7922 6536 7018 7411 3775 2014 2339 4064 6623 4173 4031 5979 4930 7654 4039 1531 4916 7357 8802 6935 6108 1580 3999 6225 2641 6330 6907 2584 3437 7753 8680 2192 4461 1695 8174 3128 4724 3826 7640 8669 4481 4763 2983 4433 8317 8102 1355 7456 4577 8442 8319 5010 1140 1232 1688 4080 4445 3548 5713 8391 4295 1477 8487 5823 9493 4528 2589 9499 6092 9784 6773 1907 9382 2203 3774 8438 8672 3290 3590 4540 2912 7308 9782 5615 8352 9456 5867 5657 6838 6294 3295 4741 5949 9369 8949 9672 5853 7054 3755 3113 4712 9043 3412 4546 2567 9934 2034 2007 1845 6466 2815 3012 5736 2487 6250 6817 7309 8503 9697 6149 7132 6936 5692 2757 6150 2705 1401 9272 4190 6116 8096 2386 2027 8913 7734 7318 4423 8439 7087 7995 8429 7139 1495 3284 2418 3295 5121 2989 5741 1905 5468 9828 8946 3179 7615 9766 2971 6450 4686 9597 4851 2080 7062 1956 2386 7476 1703 2738 3864 6491 7545 3046 1432 1050 3534 6054 5005 4862 9126 2877 1259 8613 1209 4982 9877 1697 4142 7484 2562 1554 8105 6483 3440 1462 8463 2006 7193 8316 6544 7043 2857 5525 6953 8924 7032 7593 4514 2192 8088 2861 4685 7319 3300 2147 9992 2985 8834 4323 6566 8357 9802 8257 7543 3607 1131 9474 9203 9127 7767 92 91 638 995 678 799 575 772 748 983 546 599 855 881 780 818 894 847 645 897 773 564 575 708 90 364 413 434 498 433 410 437 19 263 296 294 281 302 210 241 218 236 70 180 197 8 59 26 104

Corrupt .8xp file for TI 84+

I am trying to write a few programs for my TI 84+ calculator. I am writing in a basic text editor on my desktop and then compiling into .8xp files, because it is much easier than typing on the actual device. I would then like to pass the .8xp file to my calculator via TI Connect.
However, the programs I write on my desktop do not transfer to the calculator because they are "corrupt or invalid." There are no syntax errors in my TI Basic code, and it runs perfectly on my TI emulator on my computer.
I've written the exact same program on my desktop and on my calculator to experiment with the problem, and when I compare the .8xp hex files, they are almost identical, but differ slightly. Is this simply because my compiler for my .8xp files is not working properly? If that was the case, why would it run in my emulator and not the actual calculator? Are there certain functions that I should avoid when programming in TI Basic on my computer, because the compiler may have a hard time compiling? Does anyone know how to fix these corrupt file issues? I've been perusing Google to no avail as well.
If it helps, .8xp files are the user-written program files for the TI-84+, which uses z80 assembly. I am using the Wabbitemu emulator.
EDIT: Here are the two .8xp files that are not the same. One was written on my computer and then compiled, and the other was written on my calculator. The code for the program is:
Output(1,1,"HELLO")
From my calculator:
2a2a 5449 3833 462a 1a0a 0050 726f 6772
616d 2066 696c 6520 3130 2f32 392f 3136
2c20 3130 3a33 3600 0000 0000 0000 0000
0000 0000 0020 000d 000f 0005 4845 4c4c
4f00 0000 0000 0f00 0d00 e031 2b31 2b2a
4845 4c4c 4f2a 1122 05
From my computer:
2a2a 5449 3833 462a 1a0a 0047 656e 6572
6174 6564 2062 7920 7468 6520 5449 2d42
4153 4943 2043 6f6d 7069 6c65 722e 0000
0000 0000 0021 000d 0010 0005 4845 4c4c
4f32 0000 0000 1000 0e00 e031 2b31 2b2a
4845 4c4c 4f2a 113f 9605
In addition, here's the .8xp for my program that is allegedly corrupt or invalid. The code is for the game Checkers (keep in mind it still needs some serious optimization):
2a2a 5449 3833 462a 1a0a 0047 656e 6572
6174 6564 2062 7920 7468 6520 5449 2d42
4153 4943 2043 6f6d 7069 6c65 722e 0000
0000 0000 0011 0d0d 0000 0d05 4348 4543
4b45 5253 0000 000d fe0c 2a53 4554 2955
5029 424f 4152 443f e13f 3104 583f d158
6d38 3fe0 582b 392b 2a2d 2a11 3f31 7058
0458 3fd4 3f36 3404 b55d 0011 3fe2 302b
5d00 113f 3104 5d00 1032 113e 3104 5d00
1034 113e 3104 5d00 1036 113e 3104 5d00
1038 113e 3104 5d00 1039 113e 3104 5d00
1031 3111 3e31 045d 0010 3133 113e 3104
5d00 1031 3511 3e31 045d 0010 3138 113e
3104 5d00 1032 3011 3e31 045d 0010 3232
113e 3104 5d00 1032 3411 3f32 045d 0010
3431 113e 3204 5d00 1034 3311 3e32 045d
0010 3435 113e 3204 5d00 1034 3711 3e32
045d 0010 3530 113e 3204 5d00 1035 3211
3e32 045d 0010 3534 113e 3204 5d00 1035
3611 3e32 045d 0010 3537 113e 3204 5d00
1035 3911 3e32 045d 0010 3631 113e 3204
5d00 1036 3311 3f08 3132 2b31 3209 045d
013f 2a44 5241 5729 5049 4543 4553 294f
4e29 424f 4152 443f 2a4f 2a04 aa00 3e2a
702a 04aa 013e 2af0 2a04 aa02 3f31 0458
3e31 0459 3e31 045b 3e30 0441 3fd1 5b6d
3634 3f52 454d 4149 4e44 4552 105b 2b38
1104 583f ce58 6a30 3e38 0458 3f12 105b
8338 1170 3a34 2b30 1104 593f 5d00 105b
1104 413f ce41 6a31 3ee0 592b 582b aa00
113f ce41 6a32 3ee0 592b 582b aa01 113f
5b70 3104 5b3f d43f 2a55 4929 5354 5546
463f e031 2b31 302b 2a54 5552 4e3e 292a
113f e033 2b31 302b 2a53 454c 4543 542a
113e e034 2b31 322b 2a50 4945 4345 2a11
3f2a 4d41 494e 2947 414d 4529 4c4f 4f50
3f2a 1050 2b51 1129 6a29 4355 5253 4f52
2943 4f4f 5244 533f 2a10 412b 4211 296a
2950 5245 5649 4f55 5329 434f 4f52 4453
3f2a 5b29 6a29 4c49 5354 2949 4e44 4558
2941 5429 5052 4556 494f 5553 3f2a 5a29
6a29 4c49 5354 2949 4e44 4558 2941 5429
4355 5253 4f52 3f2a 5229 6a29 5641 4c55
4529 4154 2950 5245 5649 4f55 533f 2a4d
296a 2949 4e54 4552 4d45 4449 4154 4529
5641 5249 4142 4c45 2910 5445 4d50 113f
2a46 2b47 296a 2949 4e54 4552 4d45 4449
4154 4529 5641 5249 4142 4c45 2910 5445
4d50 113f 2a4e 296a 2949 4e54 4552 4d45
4449 4154 4529 4d41 5448 2956 4152 4941
424c 453f 2a10 552b 5611 296a 294d 4f56
4529 434f 4f52 4453 3f2a 4829 6a29 434f
554e 5445 5229 464f 5229 464c 4153 4849
4e47 2943 5552 534f 523f 2a43 296a 29ad
3f2a 5729 6a29 4d4f 5645 294c 1031 113c
5210 3211 3f2a 4429 6a29 4355 5252 454e
5429 504c 4159 4552 2910 4529 6a29 4845
4c50 4552 2956 4152 113f 2a4a 2b4b 296a
2944 4f55 424c 4529 4a55 4d50 2943 4f55
4e54 4552 3f2a 4929 6a29 5354 4154 5553
294f 4629 4741 4d45 3f34 0450 3e31 0451
3e31 0441 3e31 0442 3e30 045b 3e30 045a
3e30 0452 3e31 0444 3e30 0449 3fd1 496a
303f 5004 413e 5104 423f 3882 4104 4e3e
4e71 3804 4e3e 4e70 4204 5b3f d272 3fad
0443 3fd4 3f5d 0010 5b11 0452 3fce 526a
303e e041 2b42 2b2a 292a 113f ce52 6a31
3ee0 412b 422b aa00 113f ce52 6a32 3ee0
412b 422b aa01 113f ce43 6a32 343e 5171
3104 513f ce43 6a32 353e 5071 3104 503f
ce43 6a32 363e 5170 3104 513f ce43 6a33
343e 5070 3104 503f ce43 6a31 3035 3ecf
3e3f 3882 5004 4e3e 4e71 3804 4e3e 4e70
5104 5a3f 3004 483e 3004 573e 3004 4a3e
3004 4b3f 5d00 105a 1104 523f e034 2b31
302b 2a29 2929 2929 2929 2a11 3ee0 342b
3132 2b2a 4d4f 5645 2a11 3fce 526a 3240
446a 313e cf3f d157 6a30 3fce 486b 333e
cf3e e050 2b51 2b2a 292a 113e d03e e050
2b51 2baa 0111 3ed4 3f52 454d 4149 4e44
4552 105a 7139 2b38 1104 553f ce55 6a30
3e38 0455 3f12 1010 5a71 3911 8338 1170
3a34 2b30 1104 563f ce10 5a71 3911 6d30
3c5a 6a35 373c 5a6a 3431 3c5a 6a32 353c
5a6a 393e cf3e b031 0446 3ed0 3e5d 0010
5a71 3911 0446 3ed4 3fce 466a 303e cf3e
e056 2b55 2b2a af2a 113f d03e ce46 6a31
4010 5a71 3138 116c 3040 105a 7139 116f
3537 4010 5a71 3911 6f34 3140 105a 7139
116f 3235 4010 5a71 3911 6f39 3ecf 3e5a
7139 045a 3e52 454d 4149 4e44 4552 105a
7139 2b38 1104 553e ce55 6a30 3e38 0455
3e12 1010 5a71 3911 8338 1170 3a34 2b30
1104 563e 5d00 105a 7139 1104 463e 5a70
3904 5a3e ce46 6a30 3ecf 3ee0 562b 552b
2aaf 2a11 3e31 044a 3ed4 3ed4 3ed4 3f52
454d 4149 4e44 4552 105a 7137 2b38 1104
553f ce55 6a30 3e38 0455 3f12 1010 5a71
3711 8338 1170 3a34 2b30 1104 563f ce10
5a71 3711 6d30 3c5a 6a38 3c5a 6a32 343c
5a6a 3430 3c5a 6a35 363e cf3e b031 0447
3ed0 3e5d 0010 5a71 3711 0447 3ed4 3fce
476a 303e cf3e e056 2b55 2b2a af2a 113f
d03e ce47 6a31 4010 5a71 3134 116c 3040
105a 7137 116f 3840 105a 7137 116f 3234
4010 5a71 3711 6f34 3040 105a 7137 116f
3536 3ecf 3e5a 7137 045a 3e52 454d 4149
4e44 4552 105a 7137 2b38 1104 553e ce55
6a30 3e38 0455 3e12 1010 5a71 3711 8338
1170 3a34 2b30 1104 563e 5d00 105a 7137
1104 473e 5a70 3704 5a3e ce47 6a30 3ecf
3ee0 562b 552b 2aaf 2a11 3e31 044b 3ed4
3ed4 3ed4 3f48 7031 0448 3fce 486e 363e
3004 483f ad04 433f ce43 6a32 343e 3104
573f ce43 6a32 363e 3204 573f ce43 6a31
3035 3ecf 3e33 0457 3e31 0445 3ed0 3e32
0445 3ed4 3fd4 3ed4 3fce 526a 3140 446a
323e cf3f d157 6a30 3fce 486b 333e cf3e
e050 2b51 2b2a 292a 113e d03e e050 2b51
2baa 0011 3ed4 3f52 454d 4149 4e44 4552
105a 7039 2b38 1104 553f ce55 6a30 3e38
0455 3f12 1010 5a70 3911 8338 1170 3a34
2b30 1104 563f ce10 5a70 3911 6e36 353c
5a6a 383c 5a6a 3234 3c5a 6a34 303c 5a6a
3536 3ecf 3eb0 3104 463e d03e 5d00 105a
7039 1104 463e d43f ce46 6a30 3ecf 3ee0
562b 552b 2aaf 2a11 3fd0 3ece 466a 3240
105a 7031 3811 6b36 3540 105a 7039 116f
3840 105a 7039 116f 3234 4010 5a70 3911
6f34 3040 105a 7039 116f 3536 3ecf 3e5a
7039 045a 3e52 454d 4149 4e44 4552 105a
7039 2b38 1104 553e ce55 6a30 3e38 0455
3e12 1010 5a70 3911 8338 1170 3a34 2b30
1104 563e 5d00 105a 7039 1104 463e 5a71
3904 5a3e ce46 6a30 3ecf 3ee0 562b 552b
2aaf 2a11 3e31 044a 3ed4 3ed4 3ed4 3f52
454d 4149 4e44 4552 105a 7037 2b38 1104
553f ce55 6a30 3e38 0455 3f12 1010 5a70
3711 8338 1170 3a34 2b30 1104 563f ce10
5a70 3711 6e36 353c 5a6a 3537 3c5a 6a34
313c 5a6a 3235 3c5a 6a39 3ecf 3eb0 3104
473e d03e 5d00 105a 7037 1104 473e d43f
ce47 6a30 3ecf 3ee0 562b 552b 2aaf 2a11
3fd0 3ece 476a 3240 105a 7031 3411 6b36
3540 105a 7037 116f 3537 4010 5a70 3711
6f34 3140 105a 7037 116f 3235 4010 5a70
3711 6f39 3ecf 3e5a 7037 045a 3e52 454d
4149 4e44 4552 105a 7037 2b38 1104 553e
ce55 6a30 3e38 0455 3e12 1010 5a70 3711
8338 1170 3a34 2b30 1104 563e 5d00 105a
7037 1104 473e 5a71 3704 5a3e ce47 6a30
3ecf 3ee0 562b 552b 2aaf 2a11 3e31 044b
3ed4 3ed4 3ed4 3f48 7031 0448 3fce 486e
363e 3004 483f ad04 433f ce43 6a32 343e
3104 573f ce43 6a32 363e 3204 573f ce43
6a31 3035 3ecf 3e33 0457 3e32 0445 3ed0
3e31 0445 3ed4 3fd4 3ed4 3fe0 332b 3130
2b2a 2929 2929 2929 292a 113f e034 2b31
302b 2a29 2929 2929 2929 2a11 3fe0 362b
3130 2b2a 574f 524b 494e 472a 113f e038
2b31 302b 2a3a 2a11 3fce 446a 313e cf3f
ce57 6a31 4046 6a30 3ecf 3ece 4a6a 303e
cf3e 3204 5d00 105a 7139 113e 3004 5d00
105a 113e d03e ce4a 6a31 3ecf 3e32 045d
0010 5a71 3138 113e 3004 5d00 105a 113e
3004 5d00 105a 7139 113e d43e d43e d43f
ce57 6a32 4047 6a30 3ecf 3ece 4b6a 303e
cf3e 3204 5d00 105a 7137 113e 3004 5d00
105a 113e d03e ce4b 6a31 3ecf 3e32 045d
0010 5a71 3134 113e 3004 5d00 105a 113e
3004 5d00 105a 7137 113e d43e d43e d43f
e038 2b31 312b 2a3a 2a11 3fd0 3e3f ce57
6a32 4046 6a30 3ecf 3ece 4a6a 303e cf3e
3104 5d00 105a 7039 113e 3004 5d00 105a
113e d03e ce4a 6a31 3ecf 3e31 045d 0010
5a70 3138 113e 3004 5d00 105a 113e 3004
5d00 105a 7039 113e d43e d43e d43f ce57
6a31 4047 6a30 3ecf 3ece 4b6a 303e cf3e
3104 5d00 105a 7037 113e 3004 5d00 105a
113e d03e ce4b 6a31 3ecf 3e31 045d 0010
5a70 3134 113e 3004 5d00 105a 113e 3004
5d00 105a 7037 113e d43e d43e d43f e038
2b31 312b 2a3a 2a11 3fd4 3f31 0458 3e31
0459 3e31 044d 3e30 044e 3f08 302b 3009
045d 013f d14d 6d36 343f 5245 4d41 494e
4445 5210 4d2b 3811 0458 3fce 586a 303e
3804 583f 1210 4d83 3811 703a 342b 3011
0459 3f5d 0010 4d11 044e 3fce 4e6a 303e
e059 2b58 2b2a 292a 113f ce4e 6a31 3ecf
3ee0 592b 582b aa00 113e 5d01 1031 1170
3104 5d01 1031 113e d43f ce4e 6a32 3ecf
3ee0 592b 582b aa01 113e 5d01 1032 1170
3104 5d01 1032 113e d43f ce4d 6a31 363e
e038 2b31 322b 2a3a 2a11 3fce 4d6a 3332
3ee0 382b 3133 2b2a 3a2a 113f ce4d 6a34
383e e038 2b31 342b 2a3a 2a11 3fce 4d6a
3633 3ee0 382b 3135 2b2a 3a2a 113f 4d70
3104 4d3f d43f ce5d 0110 3111 6a30 3e32
0449 3fce 5d01 1032 116a 303e 3104 493f
ce45 6a32 3e32 0444 3fce 456a 313e 3104
443f e038 2b31 362b 2a3a 2a11 3fe0 342b
3130 2b2a 2929 2929 2929 292a 113f e031
2b31 302b 2a54 5552 4e3e 292a 113f e033
2b31 302b 2a53 454c 4543 542a 113e e034
2b31 322b 2a50 4945 4345 2a11 3fe0 362b
3130 2b2a 2929 2929 2929 292a 113f d43f
2a55 4929 5354 5546 463f ce44 6a32 3ee0
312b 3136 2baa 0011 3fce 446a 313e e031
2b31 362b aa01 113f ce50 6a30 3e31 0450
3fce 506a 393e 3804 503f ce51 6a30 3e31
0451 3fce 516a 393e 3804 513f e050 2b51
2baa 0211 3fe0 382b 3130 2b2a 2929 2929
2929 292a 113f d43f 6aa5
The only difference I can see between the two .8xps, both of which appear to have correct headers and checksums, is that the one from your computer, which is a byte longer, appends a 0x3f 'hard return' after its tokenisation of Output(1,1,"HELLO"). The last two bytes are a checksum, the 0x3f when present is the byte before that, and the earlier differences are all about the different length of subsequent data.
So, if I had to go out on a limb, is this perhaps a CR/LF misunderstanding? Maybe you're using a tool originally designed under Linux with text from a Windows-hosted editor? Try eliminating your final line break entirely if you can as a test; if that succeeds then see whether your editor supports using only linefeed characters rather than carriage return + linefeeds.

Shoud a Savitsky-Golay 2d/image smoothing kernel be the same when using cross terms or not

W/r to the code below: (Code is Matlab but it's really an algorithm question)
Size - the desired image convolution kernel size
PolyDegree - degree of polynomial
crossterms - boolean ==> whether there should be cross terms
So, if, say, PolyDegree=2 and crossterms is false, the design matrix,
A=[1,X,X^2,Y,Y^2]
If the crossterms is true then
A=[1,Y,Y^2,X,XY,X^2]
Note, if there was a cubic, there would be a lot more cross terms (e.g. X^2Y,Y^2X). However, I've tried this for 7x7 and 5x5 filters for quadratics and cubics, and for each combination, the smoothing SG Kernel is the same regardless of crossterms (i.e. given as true of false).
EDIT - Actually, for the same Size filter, it gives the same result regardless of degree. So, for example, a Size=7 filter with PolyDegree==2 and crossterms=0 yields the same SG filter (as shown at the bottom) for PolyDegree=3 and crossterms=1?!**
Is that right or am I screwing up?
x = -(Size(2)-1)/2 :(Size(2)-1)/2; % e.g Size(2)==5==>x=-2:2
y = -(Size(1)-1)/2 :(Size(1)-1)/2;
[x,y]=meshgrid(x,y);
x=x(:);
y=y(:);
if crossterms
A=[];
for kx=0:PolyDegree
for ky=0:(PolyDegree-kx)
A=[A x.^kx .* y.^ky];
end
end
else
A = ones(size(x));
for k=1:1:PolyDegree
A=[A x.^k];
end
for k=1:1:PolyDegree
A=[A y.^k];
end
end
C=inv(A'*A)*A'; % == pinv(A)
h=reshape(C(:,1),Size(1),Size(2)); % h=first row should be SG smoothing kernel.
So, for example, regardless of crossterms, or/and even whether I specified a 2 or 3 degree polynomial, a 7x7 Size bicubic (PolyDegree==3) yields:
h =
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
0.0136 0.0476 0.0680 0.0748 0.0680 0.0476 0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
from https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter
:
In general, polynomials of degree (0 and 1),[note 3] (2 and 3), (4 and
5) etc. give the same coefficients for smoothing and even derivatives.
Polynomials of degree (1 and 2), (3 and 4) etc. give the same
coefficients for odd derivatives.
so 2 and 3 degree were the same but 4 was different but then 4 was the same as 5 given the same crossterms setting. However, unlike for degrees 2 and 3, 4 and 5 were different when the crossterms setting was off vs on.
Still not sure about the crossterms biz being the same (i.e. generating the same filter whether crossterms is 1 of 0). Note:
The function sgsdf_2da called below corresponds to the above code (in my question). The function has the API sgsdf_2da(Size, PolyDegree, , crossterms). A Scalar Size ==> a square Size x Size filter and "crossterms", as per the above code, is true for having polynomial cross terms, false for not.
>> hi=sgsdf_2da(7,2,0,0)
hi =
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
0.0136 0.0476 0.0680 0.0748 0.0680 0.0476 0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
>> hi=sgsdf_2da(7,2,0,1)
hi =
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
0.0136 0.0476 0.0680 0.0748 0.0680 0.0476 0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
>> hi=sgsdf_2da(7,3,0,0)
hi =
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
0.0136 0.0476 0.0680 0.0748 0.0680 0.0476 0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
>> hi=sgsdf_2da(7,3,0,1)
hi =
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
0.0136 0.0476 0.0680 0.0748 0.0680 0.0476 0.0136
0.0068 0.0408 0.0612 0.0680 0.0612 0.0408 0.0068
-0.0136 0.0204 0.0408 0.0476 0.0408 0.0204 -0.0136
-0.0476 -0.0136 0.0068 0.0136 0.0068 -0.0136 -0.0476
>> hi=sgsdf_2da(7,4,0,0)
hi =
-0.0142 -0.0359 0.0291 0.0637 0.0291 -0.0359 -0.0142
-0.0359 -0.0575 0.0074 0.0421 0.0074 -0.0575 -0.0359
0.0291 0.0074 0.0724 0.1070 0.0724 0.0074 0.0291
0.0637 0.0421 0.1070 0.1416 0.1070 0.0421 0.0637
0.0291 0.0074 0.0724 0.1070 0.0724 0.0074 0.0291
-0.0359 -0.0575 0.0074 0.0421 0.0074 -0.0575 -0.0359
-0.0142 -0.0359 0.0291 0.0637 0.0291 -0.0359 -0.0142
>> hi=sgsdf_2da(7,4,0,1)
hi =
0.0425 -0.0359 -0.0049 0.0183 -0.0049 -0.0359 0.0425
-0.0359 -0.0575 0.0074 0.0421 0.0074 -0.0575 -0.0359
-0.0049 0.0074 0.0928 0.1342 0.0928 0.0074 -0.0049
0.0183 0.0421 0.1342 0.1779 0.1342 0.0421 0.0183
-0.0049 0.0074 0.0928 0.1342 0.0928 0.0074 -0.0049
-0.0359 -0.0575 0.0074 0.0421 0.0074 -0.0575 -0.0359
0.0425 -0.0359 -0.0049 0.0183 -0.0049 -0.0359 0.0425
>> hi=sgsdf_2da(7,5,0,0)
hi =
-0.0142 -0.0359 0.0291 0.0637 0.0291 -0.0359 -0.0142
-0.0359 -0.0575 0.0074 0.0421 0.0074 -0.0575 -0.0359
0.0291 0.0074 0.0724 0.1070 0.0724 0.0074 0.0291
0.0637 0.0421 0.1070 0.1416 0.1070 0.0421 0.0637
0.0291 0.0074 0.0724 0.1070 0.0724 0.0074 0.0291
-0.0359 -0.0575 0.0074 0.0421 0.0074 -0.0575 -0.0359
-0.0142 -0.0359 0.0291 0.0637 0.0291 -0.0359 -0.0142
>> hi=sgsdf_2da(7,5,0,1)
hi =
0.0425 -0.0359 -0.0049 0.0183 -0.0049 -0.0359 0.0425
-0.0359 -0.0575 0.0074 0.0421 0.0074 -0.0575 -0.0359
-0.0049 0.0074 0.0928 0.1342 0.0928 0.0074 -0.0049
0.0183 0.0421 0.1342 0.1779 0.1342 0.0421 0.0183
-0.0049 0.0074 0.0928 0.1342 0.0928 0.0074 -0.0049
-0.0359 -0.0575 0.0074 0.0421 0.0074 -0.0575 -0.0359
0.0425 -0.0359 -0.0049 0.0183 -0.0049 -0.0359 0.0425

How can I separate a file with columns 1-7 of data into ONE column with all the data in order?

For example, I have all of this data but i want it organized in a way such that the output file is purely numbers, with rows 1-7 corresponding to columns 1-7, then rows 8-14 corresponding to columns 1-7 on the second row, and etc.
Can I do this using awk?
Also
Example of data:
Total 31.6459262.4011 31.6463 31.6463 0.0006 0.0006 0.0007
Total 0.0007 0.0007 0.0007 0.0007 0.0007 0.0008 0.0008
Total 0.0008 0.0008 0.0008 0.0008 0.0008 0.0008 0.0008
Total 0.0008 0.0008 0.0008 0.0008 0.0008 0.0008 0.0008
Total 0.0008 0.0007 0.0007 0.0007 0.0006 0.0006 0.0006
Total 0.0005 0.0005 0.0004 0.0003 0.0003 0.0002 0.0001
Total 0.0001 0.0000 -0.0001 -0.0002 -0.0002 -0.0003 -0.0004
Total -0.0005 -0.0006 -0.0007 -0.0008 -0.0009 -0.0010 -0.0011
Total -0.0011 -0.0012 -0.0013 -0.0014 -0.0015 -0.0015 -0.0016
Total -0.0016 -0.0017 -0.0018 -0.0018 -0.0018 -0.0019 -0.0019
Total -0.0019 -0.0019 -0.0020 -0.0020 -0.0020 -0.0020 -0.0020
Total -0.0019 -0.0019 -0.0019 -0.0019 -0.0018 -0.0018 -0.0018
Total -0.0017 -0.0017 -0.0017 -0.0016 -0.0016 -0.0015 -0.0015
Total -0.0014 -0.0014 -0.0013 -0.0012 -0.0012 -0.0011 -0.0011
Total -0.0010 -0.0010 -0.0009 -0.0009 -0.0008 -0.0008 -0.0007
Total 31.6459262.4010 31.6461 31.6462 0.0006 0.0006 0.0006
Total 0.0007 0.0007 0.0007 0.0007 0.0007 0.0007 0.0007
Total 0.0008 0.0008 0.0008 0.0008 0.0008 0.0008 0.0008
The output is lengthy to type, but it would consist of all these numbers arranged in one column without the four numbers that repeat every so often, 31.6459, 262.4010, 31.6461, and 31.6462. These four numbers are not always exactly the same, but they are certainly always greater than ~20. And they do repeat every 101 numbers.
Output:
0.0006
0.0006
0.0007
0.0007
0.0007
0.0007
0.0007
0.0007
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0007
0.0007
0.0007
0.0006
0.0006
0.0006
0.0005
0.0005
0.0004
0.0003
0.0003
0.0002
0.0001
0.0001
0.0000
-0.0001
-0.0002
-0.0002
-0.0003
-0.0004
-0.0005
-0.0006
-0.0007
-0.0008
-0.0009
-0.0010
-0.0011
-0.0011
-0.0012
-0.0013
-0.0014
-0.0015
-0.0015
-0.0016
-0.0016
-0.0017
-0.0018
-0.0018
-0.0018
-0.0019
-0.0019
-0.0019
-0.0019
-0.0020
-0.0020
-0.0020
-0.0020
-0.0020
-0.0019
-0.0019
-0.0019
-0.0019
-0.0018
-0.0018
-0.0018
-0.0017
-0.0017
-0.0017
-0.0016
-0.0016
-0.0015
-0.0015
-0.0014
-0.0014
-0.0013
-0.0012
-0.0012
-0.0011
-0.0011
-0.0010
-0.0010
-0.0009
-0.0009
-0.0008
-0.0008
-0.0007
0.0006
0.0006
0.0006
0.0007
0.0007
0.0007
0.0007
0.0007
0.0007
0.0007
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
There are PLENTY of numbers that repeat frequently in your data so we can't exclude the ones you mention based on them repeating so - do you want exclude numbers with value >= 20?
If so, this may be what you want using GNU awk for FIELDWIDTHS:
$ awk 'BEGIN{FIELDWIDTHS="8 8 8 8 8 8 8 8"}
{for (i=2;i<=NF;i++) if ($i<20) {sub(/^ +/,"",$i); print $i} }' file
0.0006
0.0006
0.0007
0.0007
0.0007
0.0007
0.0007
0.0007
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0007
0.0007
0.0007
0.0006
0.0006
0.0006
0.0005
0.0005
0.0004
0.0003
0.0003
0.0002
0.0001
0.0001
0.0000
-0.0001
-0.0002
-0.0002
-0.0003
-0.0004
-0.0005
-0.0006
-0.0007
-0.0008
-0.0009
-0.0010
-0.0011
-0.0011
-0.0012
-0.0013
-0.0014
-0.0015
-0.0015
-0.0016
-0.0016
-0.0017
-0.0018
-0.0018
-0.0018
-0.0019
-0.0019
-0.0019
-0.0019
-0.0020
-0.0020
-0.0020
-0.0020
-0.0020
-0.0019
-0.0019
-0.0019
-0.0019
-0.0018
-0.0018
-0.0018
-0.0017
-0.0017
-0.0017
-0.0016
-0.0016
-0.0015
-0.0015
-0.0014
-0.0014
-0.0013
-0.0012
-0.0012
-0.0011
-0.0011
-0.0010
-0.0010
-0.0009
-0.0009
-0.0008
-0.0008
-0.0007
0.0006
0.0006
0.0006
0.0007
0.0007
0.0007
0.0007
0.0007
0.0007
0.0007
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
0.0008
I feel like you could have come up with a briefer example btw.

Convert code from Matlab to Mathematica

I need to convert some code from Matlab to Mathematica.
At some point I have
fspecial('gaussian', 11, 1.5)
I am confused about what will be equivalent to write in Mathematica.
In Matlab I get:
0.0000 0.0000 0.0000 0.0001 0.0002 0.0003 0.0002 0.0001 0.0000 0.0000 0.0000
0.0000 0.0001 0.0003 0.0008 0.0016 0.0020 0.0016 0.0008 0.0003 0.0001 0.0000
0.0000 0.0003 0.0013 0.0039 0.0077 0.0096 0.0077 0.0039 0.0013 0.0003 0.0000
0.0001 0.0008 0.0039 0.0120 0.0233 0.0291 0.0233 0.0120 0.0039 0.0008 0.0001
0.0002 0.0016 0.0077 0.0233 0.0454 0.0567 0.0454 0.0233 0.0077 0.0016 0.0002
0.0003 0.0020 0.0096 0.0291 0.0567 0.0708 0.0567 0.0291 0.0096 0.0020 0.0003
0.0002 0.0016 0.0077 0.0233 0.0454 0.0567 0.0454 0.0233 0.0077 0.0016 0.0002
0.0001 0.0008 0.0039 0.0120 0.0233 0.0291 0.0233 0.0120 0.0039 0.0008 0.0001
0.0000 0.0003 0.0013 0.0039 0.0077 0.0096 0.0077 0.0039 0.0013 0.0003 0.0000
0.0000 0.0001 0.0003 0.0008 0.0016 0.0020 0.0016 0.0008 0.0003 0.0001 0.0000
0.0000 0.0000 0.0000 0.0001 0.0002 0.0003 0.0002 0.0001 0.0000 0.0000 0.0000
I need to get the same in Mathematica too.
Thank you in advance
According to the matlab documentation, this command creates a correlation kernel for a gaussian filter. In mathematica, you can simply use ImageCorrelate, and pass this kernel as the second argument.
GaussianMatrix[{5, 1.5}, Method -> "Gaussian"]
5 is the radius ((11 - 1) / 2)
1.5 is the standard deviation
Setting the Method to "Gaussian" makes Mathematica use Matlab's equations

Resources