i have used functions in my program. how to write program without using functions?

i have taken a code from online. in that code they have called functions in program. i need the same program without calling functions. how can i write a code

5 件のコメント

KSSV
KSSV 2018 年 9 月 5 日
You need to know what the function does.....once you know it, you can code it on your own. We cannot help unless we know what are the functions...and don't expect us to write the whole function for you.
Stephen23
Stephen23 2018 年 9 月 5 日
編集済み: Stephen23 2018 年 9 月 5 日
"i need the same program without calling functions"
Why do you need to do that? Functions have many advantages over scripts: faster, independent workspaces, encapsulated functionality, testability, repeatability, debugging tools, profiling tools, etc. Functions are a much better way to write code, which is why all experienced MATLAB users prefer them!
What you are saying was correct. but i need some of the lines to display in workspace. I cant check any specific line inside a function. so only i m asking this
if true
% code
end
Stephen23
Stephen23 2018 年 9 月 6 日
"I cant check any specific line inside a function"
Yes you can, that is exactly what the debugging tools are for. Instead of converting your perfectly good functions into ugly scripts, learn how to use the debugging tools:
If you want to see what is happening inside your function then converting it into scripts is not the solution. All programmers want to know what happens inside their functions, which is why they invented all of the debugging tools. You can use them too.
Shan Sha
Shan Sha 2018 年 9 月 6 日
thanks sir. i will learn to use debugging tools

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

回答 (0 件)

カテゴリ

質問済み:

2018 年 9 月 5 日

コメント済み:

2018 年 9 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by