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 Comments

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

Sign in to comment.

Answers (0)

Asked:

on 5 Sep 2018

Commented:

on 6 Sep 2018

Community Treasure Hunt

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

Start Hunting!