input argument type double

when i using my matlab code, this error appear :
Undefined function 'uneldof' for input arguments of type 'double'.
when i write " which uneldof"
it says "'undeldof' not found. "
how can i fix it.
and my code is widesprerasd that i cant bring that on this paper.

6 件のコメント

Geoff Hayes
Geoff Hayes 2020 年 5 月 11 日
Mili - what is the uneldof function? Is that something that you have written that is being called from your code? If so, please show the function signature and how you are calling it (include the data types of the inputs to this function).
Mili Kian
Mili Kian 2020 年 5 月 11 日
yes, the uneldof have written by me.
let me tell you everything.
at firs i have 2D mesh that incluade tatall point.( that its name is edof) .
but i want some points under topography situation.(i called uneldof).you can see below:
uneldof=eldof(points_below(:,1),:);
and at the other function i used just uneldof points to solve my equation.
if you want i can sent my code to you
please heeeeeelp
Geoff Hayes
Geoff Hayes 2020 年 5 月 11 日
Is uneldof a function or a variable?
uneldof=eldof(points_below(:,1),:);
The above code indicates it is a variable.
Please post the full error message (all the red text) so that we know which line is causing the problem. The problem could be that you have set this variable (with the same name as the function) and then try to call the function (which is now a variable). Try changing the variable name to something else (do not give the same name as a function).
Mili Kian
Mili Kian 2020 年 5 月 11 日
編集済み: Mili Kian 2020 年 5 月 11 日
eldof and uneldof are variable.
the function of my code are:
1-LK
2-massmat
3-IPCGdyri
4-DOfind
5-dampingmat
and one m.file that name is test.2 gives us inner information and show outer result.
the tottal error are in below:(the red lines)
Undefined function 'uneldof' for input arguments of type 'double'.
Error in IPCGdyri (line 72)
x_e(j)=x(uneldof(i,j+1));
Error in test2 (line 33)
[x,ve,ac,u,n]=IPCGdyri(9,9,1,.3,160e6,3,3,BC1,BC2,f,1e-8,.25,1200,.002,0,0,2200,out);
when i put % before "uneldof=eldof(points_below(:,1),:);"
my code work very well
Geoff Hayes
Geoff Hayes 2020 年 5 月 11 日
Mili - you will need to show your code for IPCGdyri. Does this file also inlcude the line
uneldof=eldof(points_below(:,1),:);
? How does commenting out this line prevent the error from occurring? How is uneldof used after this line of code? And are you sure that you don't have a function named uneldof?
Image Analyst
Image Analyst 2020 年 5 月 11 日
Make sure you spell things correctly. You don't always, like when you said this:
when i write " which uneldof"
it says "'undeldof' not found. "

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

回答 (1 件)

Image Analyst
Image Analyst 2020 年 5 月 11 日

0 投票

The variable is not in scope. You need to pass that variable into your functions somehow. See the FAQ for methods on how to do that: FAQ

カテゴリ

ヘルプ センター および File ExchangeVariables についてさらに検索

タグ

質問済み:

2020 年 5 月 11 日

コメント済み:

2020 年 5 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by