zmydaoshujifenzhisrm.m

来自「样条函数方法」· M 代码 · 共 39 行

M
39
字号
function[Zmy] = ZmydaoshujifenzhiSRM(BCtype,m,n)
clear all;
clc;
disp('1 represent the BCtype is liang duan jian zhi liang ');
disp('2 represent the BCtype is liang duan gu ding liang');
disp('3 represent the BCtype is zuo duan jian zhi you duan gu ding liang');
disp('please choose the type of the boundary condition');
type = input('type=');
switch type
case 1   %the BCtype is liang duan jian zhi liang
  MN = zeros(5,5);
  MN(1,1)=4.9343;
  MN(2,2)=19.739;
  MN(3,3)=44.413;
  MN(4,4)=78.955;
  MN(5,5)=123.37;
  disp('MN=');
  disp(MN);
case 2   %the BCtype is liang duan gu ding liang
  MN = zeros(5,5);
  MN =[12.775 0 -9.9065 0 -7.7511;
       0  45.977 0 -17.114 0 ;
       -9.9605 0 98.92 0 -6.2833;
       0 -17.114 0 171.58 0;
       -7.7511 0 -6.2833 0 264.01];
   disp('MN=');
   disp(MN);
case 3   %the BCtype is zuo duan jian zhi you duan gu ding liang
  MN = zeros(5,5);
  MN = [5.5724 2.1424 -1.9001 1.6426 -1.4291;
        2.1424 21.451 3.9098 -3.8226 3.5832;
        -1.9001 3.9098 47.017 5.5836 -5.6440;
        1.6426 -3.8226 5.5836 82.462 7.2171;
        -1.4291 3.5832 -5.644 7.2171 127.79];
    disp('MN=');
    disp(MN);
otherwise
  disp('You choose is wrong');
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?