matrix interplation, increasing matrix elements 13 to 50
Mostrar comentarios más antiguos
I want to increase my matrix 13 rows to 50 rows with interpolation but not linear type. Could you help me?
0.0 0.0 0.0 0.0 0.0 0.0890 0.2860 0.4380
0.0177 0.0648 0.0888 0.1070 0.1640 0.3680 0.5720 0.7040
0.0594 0.1778 0.2445 0.3140 0.4250 0.6140 0.7650 0.8540
0.2652 0.4723 0.6038 0.7260 0.8250 0.8970 0.9500 0.9820
0.5436 0.7547 0.8852 0.9570 0.9800 0.9910 0.9980 1.0000
0.7409 0.9056 0.9870 1.0000 1.0000 1.0000 1.0000 1.0000
0.7710 0.9260 0.9980 1.0000 1.0000 1.0000 1.0000 1.0000
0.7695 0.9260 0.9980 1.0000 1.0000 1.0000 1.0000 1.0000
0.6399 0.8297 0.9401 0.9710 0.9800 0.9850 0.9900 0.9920
0.3369 0.5788 0.7226 0.7780 0.8020 0.8270 0.8510 0.8770
0.0771 0.2463 0.3493 0.3890 0.4070 0.4300 0.4720 0.5360
0.0200 0.1019 0.1577 0.1770 0.1840 0.1940 0.2290 0.2990
0.0 0.0 0.0 0.0 0.0 0.0 0.0200 0.0510
Respuestas (2)
John D'Errico
el 30 de Oct. de 2021
0 votos
help interp2
Your matrix does not have 13 columns. it has 8 columns.
Decide whether you want to interpolate on rows or columns.
Decide what interplation type you want.
This is an example
A = [0.0 0.0 0.0 0.0 0.0 0.0890 0.2860 0.4380;
0.0177 0.0648 0.0888 0.1070 0.1640 0.3680 0.5720 0.7040;
0.0594 0.1778 0.2445 0.3140 0.4250 0.6140 0.7650 0.8540;
0.2652 0.4723 0.6038 0.7260 0.8250 0.8970 0.9500 0.9820;
0.5436 0.7547 0.8852 0.9570 0.9800 0.9910 0.9980 1.0000;
0.7409 0.9056 0.9870 1.0000 1.0000 1.0000 1.0000 1.0000;
0.7710 0.9260 0.9980 1.0000 1.0000 1.0000 1.0000 1.0000;
0.7695 0.9260 0.9980 1.0000 1.0000 1.0000 1.0000 1.0000;
0.6399 0.8297 0.9401 0.9710 0.9800 0.9850 0.9900 0.9920;
0.3369 0.5788 0.7226 0.7780 0.8020 0.8270 0.8510 0.8770;
0.0771 0.2463 0.3493 0.3890 0.4070 0.4300 0.4720 0.5360;
0.0200 0.1019 0.1577 0.1770 0.1840 0.1940 0.2290 0.2990;
0.0 0.0 0.0 0.0 0.0 0.0 0.0200 0.0510];
w = size(A,2);
B = interp1(1:w,A.',linspace(1,w,50),'cubic').'
2 comentarios
Salim Güven
el 30 de Oct. de 2021
A = [0.0 0.0 0.0 0.0 0.0 0.0890 0.2860 0.4380;
0.0177 0.0648 0.0888 0.1070 0.1640 0.3680 0.5720 0.7040;
0.0594 0.1778 0.2445 0.3140 0.4250 0.6140 0.7650 0.8540;
0.2652 0.4723 0.6038 0.7260 0.8250 0.8970 0.9500 0.9820;
0.5436 0.7547 0.8852 0.9570 0.9800 0.9910 0.9980 1.0000;
0.7409 0.9056 0.9870 1.0000 1.0000 1.0000 1.0000 1.0000;
0.7710 0.9260 0.9980 1.0000 1.0000 1.0000 1.0000 1.0000;
0.7695 0.9260 0.9980 1.0000 1.0000 1.0000 1.0000 1.0000;
0.6399 0.8297 0.9401 0.9710 0.9800 0.9850 0.9900 0.9920;
0.3369 0.5788 0.7226 0.7780 0.8020 0.8270 0.8510 0.8770;
0.0771 0.2463 0.3493 0.3890 0.4070 0.4300 0.4720 0.5360;
0.0200 0.1019 0.1577 0.1770 0.1840 0.1940 0.2290 0.2990;
0.0 0.0 0.0 0.0 0.0 0.0 0.0200 0.0510];
w = size(A,1);
B = interp1(1:w,A,linspace(1,w,50),'cubic')
Categorías
Más información sobre Interpolation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!