hi i stuck in basics of matlab function command
6 views (last 30 days)
Show older comments
clear all
clc
function [z,t]=calc(x,y)
z=x-y;
z=x+y;
i saved this file naming it calc.m but when i am giving input from main window the following error occurs
calc(2,3) % input ??? Error: File: calc.m Line: 3 Column: 1 Function definitions are not permitted in this context.
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!