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

📄 e418.m

📁 学习Matlab循环语句的好例子
💻 M
字号:
% Script file logx.m

%  Purpose:
%    To calculate the y(x)=log(1/(1-x))  the value of x must be <1
% else the value of x is illegal

% Record of revisions:
%    Date           Programmer             Description of change
%  =======       ===============        ==========================
%  06/06/08         ZMW                    Original code

% Define variables
% x     ----- input variable
% y     ----- output value
x=input('Please input the value of x:');
if x>=1
    disp('x is illegal!');
else
    while x<1
       y=log(1/(1-x))
       x=input('Please input the value of x:');
    end
end

⌨️ 快捷键说明

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