I want to plot a 3D plane in GNU Octave using the surf command.
I have following data
e.g
a= [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17];
b= [ 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011];
c= [ -0.88 -8.87 -0.86 -0.82 -0.77 -0.71 -0.66 -0.62 -0.57 -0.54 -0.50 -0.47 -0.44 -0.42 -0.39 -0.377 -0.36 -0.89 -0.88 -0.85 -0.81 -0.76 -0.71 -0.66 -0.61 -0.57 -0.53 -0.50 -0.47 -0.44 -0.42 -0.39 -0.37 -0.36];
I could plot it using plot3 command..
But how should I plot it by using surf command in GNU Octave?
If you want to do surf(a,b,c) then c must be a matrix of size m x n where m is the length of vector a and n the length of vector b. In your case, you could do something like:
cc = repmat(c,34,1);
surf(a,b,cc)
but I don't know if that's what you are expecting. Basically, for each value of x and y, you need a value of z.
Related
Using the following multi-column data as an the input
| Run on Thu Oct 20 14:59:37 2022
|| GB non-polar solvation energies calculated with gbsa=2
idecomp = 1: Per-residue decomp adding 1-4 interactions to Internal.
Energy Decomposition Analysis (All units kcal/mol): Generalized Born solvent
DELTAS:
Total Energy Decomposition:
Residue | Location | Internal | van der Waals | Electrostatic | Polar Solvation | Non-Polar Solv. | TOTAL
-------------------------------------------------------------------------------------------------------------------------------------------------------
SER 1 | R SER 1 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.092 +/- 0.012 | 0.092 +/- 0.012 | 0.000 +/- 0.000 | 0.000 +/- 0.001
GLY 2 | R GLY 2 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | 0.001 +/- 0.001 | -0.001 +/- 0.001 | 0.000 +/- 0.000 | 0.000 +/- 0.001
PHE 3 | R PHE 3 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.003 +/- 0.001 | 0.004 +/- 0.001 | 0.000 +/- 0.000 | 0.000 +/- 0.001
ARG 4 | R ARG 4 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.160 +/- 0.025 | 0.164 +/- 0.025 | 0.000 +/- 0.000 | 0.003 +/- 0.001
LYS 5 | R LYS 5 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.211 +/- 0.038 | 0.230 +/- 0.038 | 0.000 +/- 0.000 | 0.019 +/- 0.004
MET 6 | R MET 6 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.006 +/- 0.003 | 0.010 +/- 0.003 | 0.000 +/- 0.000 | 0.004 +/- 0.001
ALA 7 | R ALA 7 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.019 +/- 0.003 | 0.023 +/- 0.003 | 0.000 +/- 0.000 | 0.003 +/- 0.001
PHE 8 | R PHE 8 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | 0.020 +/- 0.003 | -0.018 +/- 0.003 | 0.000 +/- 0.000 | 0.001 +/- 0.001
PRO 9 | R PRO 9 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | 0.002 +/- 0.002 | 0.002 +/- 0.003 | 0.000 +/- 0.000 | 0.004 +/- 0.001
SER 10 | R SER 10 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | 0.003 +/- 0.004 | -0.009 +/- 0.004 | 0.000 +/- 0.000 | -0.007 +/- 0.002
I call awk to extractthe informations from the first and 8th columns to reduce the input to the 2D data and slightly modify its format
SER_1 0.000
GLY_2 0.000
PHE_3 0.000
ARG_4 0.003
LYS_5 0.019
MET_6 0.004
ALA_7 0.003
PHE_8 0.001
PRO_9 0.004
SER_10 -0.007
then am trying to plot 2D bar chat using gnuplot combined with AWK integrated into bash script:
echo "vizualisation with Gnuplot + AWK (ver 2): plot data from stdin!"
{
echo '$data << EOD'
# reduse input format to 2D columns and rename the IDs
awk '
NF==8 { gsub(/^[[:space:]]+|[[:space:]]+$/,"",$1) # strip leading/trailing spaces from 1st field
gsub(/[[:space:]]+/,"_",$1) # convert all contiguous spaces to a single '_'
gsub(/^[[:space:]]+|[[:space:]]+$/,"",$8) # strip leading/trailing spaces from 8th field
split($8,a,"[[:space:]]") # split 8th field on white space
if (a[1]+0 == a[1] && a[1] > -10 ) # if 1st sub-field is numeric and > 0.005 then ...
print $1,a[1] # print to stdout
}
' $file |
if [ "$SORT_BARS" = 1 ]; then sort -k1,1; else cat
fi |
if [ "$COLOR_DATA" = 1 ]; then
awk -v colors="$color1 $color2 $color3 $color4 $color5 $color6" '
BEGIN { nc = split(colors,clrArr) }
{ print $0, clrArr[NR % nc + 1] }
'
else cat; fi
echo 'EOD'
cat << EOF
set term pngcairo size 800,600
set title "$file_name" noenhanced font "Century,22" textcolor "#b8860b"
set xtics noenhanced font "Helvetica,10"
set xlabel "Residue, #"
set ylabel "dG, kKal/mol"
set yrange [0:-8]
set ytics 0.1
set grid y
set key off
set boxwidth 0.9
set style fill solid 0.5
plot \$data using 0:2:3:xtic(1) with boxes lc rgb var, \
'' using 0:2:2 with labels offset 0,1
EOF
} | gnuplot > ${output}/${file_name2}.png
which produces the following error
gnuplot> plot $data using 0:2:3:xtic(1) with boxes lc rgb var
^
line 1: x range is invalid
since before I used this script to plot the same graphs based on the same input data with positive values, how could I adapt it to new format?
The resulted graph should be something like this (produced via xm-grace without bar coloring):
Just as an example: Although, gnuplot wants to be a plotting program, however, it also can do some data processing without the help of external tools.
Extracting the values from your input data using gnuplot looks (at least to me) easier than your awk script. Well, when it comes to sorting, gnuplot doesn't look too good, then, depending on the sort you might be back to external tools.
If your table has a strictly regular structure you could do the following:
Version: set column separator to "|" and further separate the column via word (check help datafile separator and help word)
Version: if you keep the default column separator (which is whitespace), your string and numerical data to extract is in columns 1, 2, and 28 (check help strcol and help column)
Do not to forget to skip 9 header lines (check help skip).
Data: SO74141830.dat
| Run on Thu Oct 20 14:59:37 2022
|| GB non-polar solvation energies calculated with gbsa=2
idecomp = 1: Per-residue decomp adding 1-4 interactions to Internal.
Energy Decomposition Analysis (All units kcal/mol): Generalized Born solvent
DELTAS:
Total Energy Decomposition:
Residue | Location | Internal | van der Waals | Electrostatic | Polar Solvation | Non-Polar Solv. | TOTAL
-------------------------------------------------------------------------------------------------------------------------------------------------------
SER 1 | R SER 1 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.092 +/- 0.012 | 0.092 +/- 0.012 | 0.000 +/- 0.000 | 0.000 +/- 0.001
GLY 2 | R GLY 2 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | 0.001 +/- 0.001 | -0.001 +/- 0.001 | 0.000 +/- 0.000 | 0.000 +/- 0.001
PHE 3 | R PHE 3 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.003 +/- 0.001 | 0.004 +/- 0.001 | 0.000 +/- 0.000 | 0.000 +/- 0.001
ARG 4 | R ARG 4 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.160 +/- 0.025 | 0.164 +/- 0.025 | 0.000 +/- 0.000 | 0.003 +/- 0.001
LYS 5 | R LYS 5 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.211 +/- 0.038 | 0.230 +/- 0.038 | 0.000 +/- 0.000 | 0.019 +/- 0.004
MET 6 | R MET 6 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.006 +/- 0.003 | 0.010 +/- 0.003 | 0.000 +/- 0.000 | 0.004 +/- 0.001
ALA 7 | R ALA 7 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | -0.019 +/- 0.003 | 0.023 +/- 0.003 | 0.000 +/- 0.000 | 0.003 +/- 0.001
PHE 8 | R PHE 8 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | 0.020 +/- 0.003 | -0.018 +/- 0.003 | 0.000 +/- 0.000 | 0.001 +/- 0.001
PRO 9 | R PRO 9 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | 0.002 +/- 0.002 | 0.002 +/- 0.003 | 0.000 +/- 0.000 | 0.004 +/- 0.001
SER 10 | R SER 10 | 0.000 +/- 0.000 | -0.000 +/- 0.000 | 0.003 +/- 0.004 | -0.009 +/- 0.004 | 0.000 +/- 0.000 | -0.007 +/- 0.002
Script:
### extract data from file
reset session
FILE = "SO74141830.dat"
set datafile separator "|"
set table $Data
plot FILE u (word(strcol(1),1).'_'.word(strcol(1),2)):(word(strcol(8),1)) skip 9 w table
unset table
set datafile separator whitespace # reset to default
print $Data
set table $Data
plot FILE u (strcol(1).'_'.strcol(2)):(column(28)) skip 9 w table
unset table
print $Data
### end of script
Result:
SER_1 0.000
GLY_2 0.000
PHE_3 0.000
ARG_4 0.003
LYS_5 0.019
MET_6 0.004
ALA_7 0.003
PHE_8 0.001
PRO_9 0.004
SER_10 -0.007
SER_1 0
GLY_2 0
PHE_3 0
ARG_4 0.003
LYS_5 0.019
MET_6 0.004
ALA_7 0.003
PHE_8 0.001
PRO_9 0.004
SER_10 -0.007
I'm trying to fine-tune tesseract 4.1.1 on my own specific data according to this guide. I want it to become able to detect and recognize text in boxes like that:
I have generated a number of images like that and corresponding to them .box files containing bounding boxes with text. To reproduce my issue here i'm going to show my pipeline using only one image. Here is the .box file for the image above:
0 1804 1659 1858 1813 0
5 1804 1659 1858 1813 0
9 1804 1659 1858 1813 0
9 1266 715 1334 1169 0
7 1266 715 1334 1169 0
8 1266 715 1334 1169 0
3 1266 715 1334 1169 0
6 1266 715 1334 1169 0
8 1266 715 1334 1169 0
0 1266 715 1334 1169 0
5 1266 715 1334 1169 0
3 1266 715 1334 1169 0
2 876 303 930 607 0
7 876 303 930 607 0
2 876 303 930 607 0
8 876 303 930 607 0
2 876 303 930 607 0
2 876 303 930 607 0
8 1671 120 1725 224 0
0 1671 120 1725 224 0
5 300 1278 354 1482 0
2 300 1278 354 1482 0
3 300 1278 354 1482 0
7 300 1278 354 1482 0
7 917 1451 975 1605 0
6 917 1451 975 1605 0
4 917 1451 975 1605 0
1 1058 1310 1132 1716 0
9 1058 1310 1132 1716 0
8 1058 1310 1132 1716 0
7 1058 1310 1132 1716 0
7 1058 1310 1132 1716 0
1 1058 1310 1132 1716 0
8 1058 1310 1132 1716 0
6 1058 1310 1132 1716 0
3 998 76 1070 382 0
4 998 76 1070 382 0
4 998 76 1070 382 0
8 998 76 1070 382 0
3 998 76 1070 382 0
6 998 76 1070 382 0
3 722 548 776 652 0
2 722 548 776 652 0
7 1782 1332 1838 1586 0
7 1782 1332 1838 1586 0
2 1782 1332 1838 1586 0
6 1782 1332 1838 1586 0
2 1782 1332 1838 1586 0
1 714 140 768 244 0
2 714 140 768 244 0
0 220 500 278 754 0
5 220 500 278 754 0
5 220 500 278 754 0
6 220 500 278 754 0
6 220 500 278 754 0
8 1676 1052 1742 1406 0
4 1676 1052 1742 1406 0
5 1676 1052 1742 1406 0
9 1676 1052 1742 1406 0
1 1676 1052 1742 1406 0
2 1676 1052 1742 1406 0
4 1676 1052 1742 1406 0
5 357 161 419 317 0
1 357 161 419 317 0
4 357 161 419 317 0
9 1424 848 1480 952 0
8 1424 848 1480 952 0
0 438 324 498 478 0
6 438 324 498 478 0
9 438 324 498 478 0
8 1503 1246 1559 1700 0
1 1503 1246 1559 1700 0
8 1503 1246 1559 1700 0
5 1503 1246 1559 1700 0
3 1503 1246 1559 1700 0
0 1503 1246 1559 1700 0
5 1503 1246 1559 1700 0
5 1503 1246 1559 1700 0
4 1503 1246 1559 1700 0
8 1553 477 1609 581 0
4 1553 477 1609 581 0
3 527 258 581 512 0
7 527 258 581 512 0
7 527 258 581 512 0
9 527 258 581 512 0
1 527 258 581 512 0
6 1665 1592 1727 1748 0
8 1665 1592 1727 1748 0
3 1665 1592 1727 1748 0
5 595 1362 651 1766 0
9 595 1362 651 1766 0
3 595 1362 651 1766 0
9 595 1362 651 1766 0
4 595 1362 651 1766 0
3 595 1362 651 1766 0
3 595 1362 651 1766 0
1 595 1362 651 1766 0
I have also converted the image into .tiff format and placed it in the same directory with .box file. Lets say we have 87.tiff and 87.box inside the directory.
Next i generate 87.lstmf file using
tesseract 87.tiff 87 lstm.train
Next i extract model using
combine_tessdata -e /usr/share/tesseract-ocr/4.00/tessdata/rus.traineddata lstm_model/rus.lstm
Next i create train.txt file containing the single line: 87.lstmf
Finally, i create bash script train.sh
/usr/bin/lstmtraining \
--model_output output/fine_tuned \
--continue_from lstm_model/rus.lstm \
--traineddata /usr/share/tesseract-ocr/4.00/tessdata/rus.traineddata \
--train_listfile train.txt \
--eval_listfile train.txt \
--max_iterations 400\
--debug_level -1
And when i run it, i have the following logs:
$ bash train.sh
Loaded file lstm_model/rus.lstm, unpacking...
Warning: LSTMTrainer deserialized an LSTMRecognizer!
Continuing from lstm_model/rus.lstm
Loaded 1/1 lines (1-1) of document 87.lstmf
Loaded 1/1 lines (1-1) of document 87.lstmf
Compute CTC targets failed!
Compute CTC targets failed!
Compute CTC targets failed!
Compute CTC targets failed!
The message "Compute CTC targets failed!" repeats infinitely until i interrupt the script.
What am i doing wrong? I'm also concerned about message "Loaded 1/1 lines (1-1)" since i have multiple bounding boxes on the image.
For lstm training on images you may need to have the .box files in the new lstm format (these can be generated by running tesseract with the lstmbox argument):
TrainingTesseract-4.00
so after each line of text mark it with a special line:
<tab> <left> <bottom> <right> <top> <page>
then run lstm.train .
I have 8 RTX GPUs. When run p2pBandwidthLatencyTest, The latencies between GPU0 and GPU1, GPU2 and GPU3, GPU4 and GPU5, GPU6 and GPU7 is 40,000 times slower than other pairs:
P2P=Enabled Latency (P2P Writes) Matrix (us)
GPU 0 1 2 3 4 5 6 7
0 1.80 49354.72 1.70 1.70 1.74 1.74 1.74 1.72
1 49354.84 1.37 1.70 1.69 1.74 1.76 1.73 1.72
2 1.88 1.81 1.73 49355.00 1.79 1.76 1.76 1.75
3 1.88 1.79 49354.85 1.33 3.79 3.84 3.88 3.91
4 1.89 1.88 1.90 1.87 1.72 49354.96 3.49 3.56
5 2.30 1.93 1.88 1.89 49354.89 1.32 3.63 3.60
6 2.55 2.53 2.37 2.29 2.24 2.26 3.50 49354.77
7 2.30 2.27 2.29 1.87 1.82 1.83 49354.85 1.36
Compare it with when peer-to-peer is disabled:
P2P=Disabled Latency Matrix (us)
GPU 0 1 2 3 4 5 6 7
0 1.80 14.31 13.86 13.49 14.52 13.89 13.58 13.58
1 13.71 1.82 14.44 13.95 14.65 13.62 15.05 15.20
2 13.38 14.23 1.73 16.59 13.77 15.44 14.10 13.64
3 12.68 15.62 12.50 1.77 14.92 15.01 15.17 14.87
4 13.51 13.60 15.09 13.40 1.27 12.48 12.68 19.47
5 14.92 13.84 13.42 13.42 16.53 1.30 16.37 16.60
6 14.29 13.62 14.66 13.62 14.90 13.70 1.32 14.33
7 14.26 13.42 14.35 13.53 16.89 14.26 17.03 1.36
Is this normal?
It turns out the super slow peer-to-peer is abnormal.
After I disable IOMMU (Intel VT-d) in the BIOS, the problem is gone:
P2P=Enabled Latency (P2P Writes) Matrix (us)
GPU 0 1 2 3 4 5 6 7
0 1.34 1.22 1.68 1.69 1.71 1.70 1.75 1.73
1 1.20 1.38 1.70 1.67 1.71 1.75 1.75 1.72
2 1.69 1.67 1.29 1.20 1.73 1.75 1.75 1.75
3 1.69 1.66 1.17 1.29 1.74 1.75 1.72 1.73
4 1.72 1.76 1.74 1.70 1.32 1.13 1.66 1.70
5 1.74 1.73 1.75 1.74 1.18 1.28 1.67 1.69
6 1.75 1.74 1.74 1.72 1.67 1.68 1.31 1.19
7 1.76 1.75 1.73 1.73 1.67 1.69 1.18 1.32
It seems the problem is the same as or is very similar to discussions in:
https://github.com/pytorch/pytorch/issues/1637
https://github.com/pytorch/pytorch/issues/24081
A few possible solutions are mentioned in the discussions:
Disable IOMMU:
https://github.com/pytorch/pytorch/issues/1637#issuecomment-338268158
https://github.com/pytorch/pytorch/issues/1637#issuecomment-401422046
Disable ACS:
https://github.com/pytorch/pytorch/issues/24081#issuecomment-557074611
https://github.com/pytorch/pytorch/issues/24081#issuecomment-547976127
My system having the problem only had IOMMU enabled in the BIOS. ACS was not turned on as lspci -vvv | grep ACS got back nothing.
==============================
Background on I/O MMU:
https://en.wikipedia.org/wiki/X86_virtualization#I/O_MMU_virtualization_(AMD-Vi_and_Intel_VT-d)
It's part of the x86 virtualization. It's the virtualization done by the chipset. Besides the name IOMMU, it's also called AMD-Vi or Intel VT-d. Not to be confused with AMD-V and Intel VT-x which are virtualization via the CPU.
I am working on my own DXF writer because I only need certain elements (such as LINE, POLYLINE, POINT an SPLINE).
I started with tfpdxfbridge and the idea was to include SPLINE support too. When I tried to manually add SPLINE to ENTITIES in the *.dxf file, the file is not opened anymore. Example of SPLINE:
SPLINE
5
274
330
1F
100
AcDbEntity
8
0
100
AcDbSpline
210
0.0
220
0.0
230
1.0
70
8
71
3
72
9
73
5
74
0
42
0.0000000001
43
0.0000000001
40
0.0
40
0.0
40
0.0
40
0.0
40
1.0
40
2.0
40
2.0
40
2.0
40
2.0
10
747.2822841342859
20
1453.676625339077
30
0.0
10
1364.898523055965
20
2324.178049512178
30
0.0
10
2830.924436828291
20
1999.364085075557
30
0.0
10
1130.854480067877
20
862.5152127789023
30
0.0
10
2837.42565094653
20
791.0561394394999
30
0.0
0
Does anybody know what the problem might be or how to make the file work again?
Here is the full file generated with tfpdxfbridge (except the SPLINE part, obviously).
0
SECTION
2
HEADER
999
Generator: TFPDxfWriteBridge
999
By jmpessoa#hotmail.com
9
$DIMASZ
40
0.1800
9
$DIMTSZ
40
0
9
$DIMGAP
40
0.0900
9
$DIMEXO
40
0.0625
9
$DIMDLI
40
0.38
9
$DIMDLE
40
0.0
9
$DIMEXE
40
0.1800
9
$DIMTXT
40
0.1800
9
$DIMTXTDIRECTION
70
0
9
$DIMTIH
70
1
9
$DIMTAD
70
0
9
$DIMCLRD
70
256
9
$DIMCLRE
70
256
9
$DIMCLRT
70
256
9
$DIMASO
70
1
9
$DIMASSOC
280
2
9
$DIMSHO
70
0
9
$DIMLUNIT
70
2
9
$DIMDEC
70
4
9
$DIMADEC
70
2
9
$INSBASE
10
0.0
20
0.0
30
0.0
9
$EXTMIN
10
0.0
20
0.0
9
$EXTMAX
10
3200.0
20
3200.0
9
$LINMIN
10
0.0
20
0.0
9
$LINMAX
10
3200.0
20
3200.0
0
ENDSEC
0
SECTION
2
TABLES
0
TABLE
2
LTYPE
70
8
100
AcDbSymbolTable
100
AcDbLTypeTable
0
LTYPE
2
CONTINUOUS
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
____________
72
65
73
0
40
0.000
70
0
0
LTYPE
2
HIDDEN
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
__ __ __
72
65
73
2
40
0.375
49
0.250
49
-0.125
70
0
0
LTYPE
2
CENTER
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
____ _ ____ _
72
65
73
4
40
2.000
49
1.250
49
-0.250
49
0.250
49
-0.250
70
0
0
LTYPE
2
DOT
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
. . . . .
72
65
73
2
40
0.250
49
0.000
49
-0.250
70
0
0
LTYPE
2
DASHDOT
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
__ . __ .
72
65
73
4
40
1.000
49
0.500
49
-0.250
49
0.000
49
-0.250
70
0
0
LTYPE
2
DIVIDE
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
____ . . ____ . .
72
65
73
6
40
1.250
49
0.500
49
-0.250
49
0.000
49
-0.250
49
0.000
49
-0.250
70
0
0
LTYPE
2
BORDER
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
__ __ . __ __ .
72
65
73
6
40
1.750
49
0.500
49
-0.250
49
0.500
49
-0.250
49
0.000
49
-0.250
70
0
0
LTYPE
2
MJLINE
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
__ __ __
72
65
73
2
40
0.375
49
0.250
49
-0.125
70
0
0
ENDTAB
0
TABLE
2
STYLE
70
2
100
AcDbSymbolTable
100
AcDbStyleTable
0
STYLE
2
DEFAULT
71
0
40
0.00
42
1.00
50
0.00
41
1.00
3
ARIAL.TTF
100
AcDbSymbolTableRecord
100
AcDbTextStyleTableRecord
70
0
0
STYLE
2
ISOCPEUR
71
0
40
0.00
42
1.00
50
0.00
41
1.00
3
isocpeur.ttf
100
AcDbSymbolTableRecord
100
AcDbTextStyleTableRecord
70
0
0
ENDTAB
0
TABLE
2
LAYER
70
9
100
AcDbSymbolTable
100
AcDbLayerTable
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
0
70
0
62
7
6
CONTINUOUS
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
HIDDEN_YELLOW
70
0
62
2
6
HIDDEN
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
CENTER_RED
70
0
62
1
6
CENTER
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
DOT_GREEN
70
0
62
3
6
DOT
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
DASHDOT_CYAN
70
0
62
4
6
DASHDOT
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
DIVIDE_BLUE
70
0
62
5
6
DIVIDE
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
BORDER_MAGENTA
70
0
62
6
6
BORDER
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
CONTINUOUS_GRAY
70
0
62
8
6
CONTINUOUS
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
MYLAYER
70
0
62
5
6
MJLINE
0
ENDTAB
0
TABLE
2
DIMSTYLE
70
2
100
AcDbSymbolTable
100
AcDbDimStyleTable
0
DIMSTYLE
100
AcDbSymbolTableRecord
100
AcDbDimStyleTableRecord
2
GENERIC
70
0
77
0
176
256
177
256
178
256
41
0.18
46
0.00
44
0.18
42
0.06
147
0.09
140
0.18
3
4
5
6
7
40
1.0
43
0.38
45
0.0
47
0.0
48
0.0
141
0.09
142
0.0
143
25.39999
144
1.0
145
0.0
146
1.0
71
0
72
0
73
1
74
1
75
0
76
0
78
0
170
0
171
2
172
0
173
0
174
0
175
0
0
DIMSTYLE
100
AcDbSymbolTableRecord
100
AcDbDimStyleTableRecord
2
CUSTOM
70
0
77
0
176
3
177
3
178
3
41
0.18
46
0.00
44
0.18
42
0.06
147
0.09
140
0.18
3
4
5
6
7
40
1.0
43
0.38
45
0.0
47
0.0
48
0.0
141
0.09
142
0.0
143
25.39999
144
1.0
145
0.0
146
1.0
71
0
72
0
73
1
74
1
75
0
76
0
78
0
170
0
171
2
172
0
173
0
174
0
175
0
0
ENDTAB
0
ENDSEC
0
SECTION
2
BLOCKS
0
ENDSEC
0
SECTION
2
ENTITIES
0
CIRCLE
100
AcDbEntity
8
BORDER_MAGENTA
62
256
6
BYLAYER
39
0.00
100
AcDbCircle
10
6.00
20
4.00
30
0.00
40
1.20
0
ARC
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbCircle
10
10.00
20
6.00
30
0.00
40
1.20
100
AcDbArc
50
10.00
51
80.00
0
POLYLINE
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
100
AcDb2dPolyline
70
0
66
1
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
0.00
20
0.00
30
0.0
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
0.00
20
3.00
30
0.0
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
1.50
20
1.50
30
0.0
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
3.00
20
3.00
30
0.0
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
3.00
20
0.00
30
0.0
0
SEQEND
0
POLYLINE
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
100
AcDb2dPolyline
70
1
66
1
0
VERTEX
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
-1.00
20
-1.00
30
0.0
0
VERTEX
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
-1.00
20
4.00
30
0.0
0
VERTEX
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
4.00
20
4.00
30
0.0
0
VERTEX
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
5.00
20
-3.00
30
0.0
0
SEQEND
0
ENDSEC
0
EOF
When I try to recover your DXF file I get the following:
Unknown header variable $LINMAX ignored on line 116.
Undefined group code 330 for object on line 1018.
Invalid or incomplete DXF input -- drawing discarded.
In your DXF you have:
330
1F
I see that 330 is included when I do my own spline and save as DXF. But, 330 is according to the documents:
Soft-pointer ID/handle to owner dictionary (optional)
This DXF will recover without any errors:
https://pastebin.com/KRpzCd4M
Perhaps you can do a comparison.
I want to do interpolation and extrapolation. I can interpolate by using interp2 command. But, this command didn't perform extrapolation. Is there any built-in function for extrapolation in octave? I have given an example in detail.
a= [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17];
b= [ 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011];
c= [ -0.88 -8.87 -0.86 -0.82 -0.77 -0.71 -0.66 -0.62 -0.57 -0.54 -0.50 -0.47 -0.44 -0.42 -0.39 -0.377 -0.36 -0.89 -0.88 -0.85 -0.81 -0.76 -0.71 -0.66 -0.61 -0.57 -0.53 -0.50 -0.47 -0.44 -0.42 -0.39 -0.37 -0.36];
cc = repmat(c,34,1);
ci= interp2(a, b, cc, 1.5, 0.0015) % Interpolation at some point
ai= [ 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14 14.5 15 15.5 16 16.5 17 17.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14 14.5 15 15.5 16 16.5 17 17.5];
bi= [ 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0015 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.0017 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011 0.011];
cim= interp2(a, b, cc, ai, bi) % Interpolation matrix
ce= interp2(a, b, cc, 18, 0.2) % Extrapolation at some point
ae= 4* [ 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14 14.5 15 15.5 16 16.5 17 17.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14 14.5 15 15.5 16 16.5 17 17.5];
be= [ 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.101 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1015 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.1017 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111 0.111];
cem= interp2(a, b, cc, ae, be) % Extrapolation matrix
How can I find ce and cem in this case? Here, it gives "NA". How should I extrapolate to find ce and cem? This code works in Octave only.
Thanks in advance
Sarah
The most similar command for data outside convex hull in octave to scatteredInterpolant of Matlab is griddata. For more information about griddata, griddata3 and griddatan read octave documentation.