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.

Matlab attemp to execute script as a function

Status
Not open for further replies.

STOIKOV

Full Member level 4
Joined
Nov 18, 2005
Messages
236
Helped
8
Reputation
16
Reaction score
2
Trophy points
1,298
Activity points
3,083
matlab attempt to execute script as a function

I have an error when trying to plot a polar chart in matlab:

% polar plot of z
r = 1.2; theta = 10*pi/180;
angle = 0:theta:36*theta; mag = r.^(angle/theta);
polar(angle,mag)
grid
title('Polar Plot')

Attempt to execute SCRIPT polar as a function.
On line 4 ==> polar(angle,mag)

Thanks.
 

attempt to execute script as a function

hi
i ran your program in matlab 7 and it worked successfully.
i think error belong to "angle" because it is one of matlab functions.
use:

r = 1.2; theta = 10*pi/180;
ang = 0:theta:36*theta; mag = r.^(ang/theta);
polar(ang,mag)
grid
title('Polar Plot')
 

    STOIKOV

    Points: 2
    Helpful Answer Positive Rating
attempt to execute script as a function

I got the same error. Have installed version 5.3, how can I verify what functions I have available ? You got a polar chart when run it ?

Tks.
 

attempt to execute script as a function:

you can search in matlab directory for file <function_nmae>.m .
yes i have a graph.
 

    STOIKOV

    Points: 2
    Helpful Answer Positive Rating
attempt to execute script as a function matlab

Try changing the name of your script file. Use something else instead of 'polar'
 

    STOIKOV

    Points: 2
    Helpful Answer Positive Rating
attempt to execute script input as a function.

it works by changing the name of the file as you suggested.
Thanks to all.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top