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.

Simple problem with MATLAB code

Status
Not open for further replies.

mouzid

Full Member level 5
Joined
Jun 22, 2007
Messages
248
Helped
9
Reputation
18
Reaction score
0
Trophy points
1,296
Activity points
2,876
MATLAB Stupid Question

Hello,

Ho can say me what's wrong with my code:

r=1:.1:10
y=atan(5*r)-2*atan(r^-9)
plot(r,y)

Matlab says

??? Error using ==> mpower
Matrix must be square.

Error in ==> PM at 2
y=atan(5*r)-2*atan(r^-9)
 

Re: MATLAB Stupid Question

Add a dot before the expenential
r=1:.1:10
y=atan(5*r)-2*atan(r.^-9)
plot(r,y)
 

    mouzid

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top