⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex2_15.m

📁 Advanced Engineering Mathematics using MATLAB by Harman, Dabney, Richert,书中全部源码
💻 M
字号:
% EX2_15.M Compute the norm of sin(x) on the interval [0,2pi]%  Compare symbolic and numerical result%    (This script requires the Symbolic Math Toolbox)% Numerical value; call function sinsq to compute (sin(x))^2normsin1=sqrt(quad('sinsq',0,2*pi));digits(5)                       % Define numerical formatnormsin1=sym(normsin1,'d')      % Numerical value%% Symbolicnormsq=int('sin(x)^(2)');       % Perform symbolic integrationnormsq=simple(normsq)           % Simplify the resultnormsqn=int('sin(x)^2',0,2*pi)  % Definite integralnorm2=sym(normsqn^(1/2))        % Symbolic square rootnormsin=double(norm2)           % Convert to a number%% Version 5  Use digits, sym, and double for numbers%  See help sym/double

⌨️ 快捷键说明

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