Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

code function in MATLAB

Status
Not open for further replies.

itmr

Member level 3
Joined
Nov 5, 2010
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,750
hhi everybody

i need to code a simple function in matlab and i have some problems
the function getting 4 variable and supose to plot 4 waves.
if the user press just 2 variables thus the function plots 2 waves.

i try to coded its like

function present_sig[x1,x2,x3,x4]
...

if nargin == 2

plot.......

elsif nargin ==4
plot.......

end

and the i try to operste the function from another m. file
the code is ;

persent_sig[x1,x2,x3,x4]
x1=...
x2=...
x3=...
x4=...

and from somehow it doesnt works good
i et error that thevariables undefined.....


i ill be very happy to any assist

thanks all
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top