MATLAB 2010 code not working in MATLAB2012a ?

MATLAB 2010 code not working in MATLAB2012a ?
my 2010a file name: TestingFile.m
function [z,w]=testingfile(a,b)
z=a+b;
w=z*b;
end
---Above code developed by 2010a, this not working in 2012a ? showing error like case sentivity ? so how
to solve this issue without change matlab code in 2012a?

回答 (1 件)

Torsten
Torsten 2022 年 1 月 10 日

1 投票

The filename must be
"testingfile.m"
not
"TestingFile.m"
Or your function must be renamed in
function [z,w] = TestingFile(a,b)

1 件のコメント

Hiro Yoshino
Hiro Yoshino 2022 年 1 月 10 日
The file name should be identical to the function name in it (case sensitive!)
This is a basic rule of MATLAB function.

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

カテゴリ

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

製品

リリース

R2012a

質問済み:

2022 年 1 月 10 日

コメント済み:

2022 年 1 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by