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

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.
"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
"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.
thanks sir. i will learn to use debugging tools

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Adding custom doc에 대해 자세히 알아보기

질문:

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