How to use a vector as input for a function?
古いコメントを表示
I have the following m file:
function [Data] = calc_file(u)
where I would like to enter u as a vector. When I try to do this I get the following error:
>> calc_file(u)
??? Undefined function or method 'calc_file' for input
arguments of type 'double'.
How do I enter a vector as the input for a function?
1 件のコメント
Star Strider
2014 年 5 月 16 日
You need to post the code for calc_file.
回答 (1 件)
Henric Rydén
2014 年 5 月 16 日
0 投票
From your question, you seem to get this error only when u is a vector and not when it is a scalar?
It looks like the calc_file.m is not on your path.
2 件のコメント
Jeroen
2014 年 5 月 16 日
Henric Rydén
2014 年 5 月 19 日
OK, could you post the code in calc_file.m?
カテゴリ
ヘルプ センター および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!