New variable creation in matlab
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Hi,
Can we create new variables inside a function apart from the input variables taken during the calling of function. If so how???
My exoerience:
It is showing an error saying that "Unrecognized function or variable 'days_in_month'."
0 个评论
回答(1 个)
Star Strider
2020-3-19
It is certainly possible to create variables inside a function. As with other variables, each needs to be assigned a value before they can be used in other expressions.
So:
days_in_month = 31;
will work.
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!