フィルターのクリア

Unrecognized function or variable

2 ビュー (過去 30 日間)
rakesh kumar
rakesh kumar 2021 年 10 月 3 日
コメント済み: Walter Roberson 2021 年 10 月 3 日
function [f]=fef1l(xl,xr)
% i .
% Purpose:
% element vector for f(x)=l
% using linear element
%
% Synopsis:
% [f]=fefll(xl,xr)
%
% Variable Description:
% f - element vector (size of 2x1)
% xl - coordinate value of the left node
% xr - coordinate value of the right node
% element vector
%
% eleng=xr-xl; % element length
f=[ eleng/2; eleng/2];
Error in fef1l (line 17)
f=[ eleng/2; eleng/2];

採用された回答

Walter Roberson
Walter Roberson 2021 年 10 月 3 日
The line
% eleng=xr-xl;
should not be commented out. It should be
eleng=xr-xl;
  2 件のコメント
rakesh kumar
rakesh kumar 2021 年 10 月 3 日
Dear Roberson,
thnks for the promt reply. but now I am getting another error.
Not enough input arguments.
Error in fef1l (line 16)
eleng=xr-xl;
Walter Roberson
Walter Roberson 2021 年 10 月 3 日
You cannot run that code just by pressing the green Run button. When you just press the green Run button, MATLAB has no way of knowing where to look for values for xr and xl
You need to go to the command line and invoke the function passing in values, such as
result = fefll(0.3, 1.84)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by