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.

[SOLVED] Help me solve errors when plotting with Matlab

Status
Not open for further replies.

nanock

Member level 1
Member level 1
Joined
Mar 13, 2011
Messages
40
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Visit site
Activity points
1,564
hi,
i will be thankful if you tell me what's the problem with this function?
"
function [t] = fun1(i)
tms=1;
is=100;
i=101:1:501;
k=0.14;
n=0.02;
t=(k*tms)/(((i/is)^n)-1)
loglog(i,t)
hold on
grid on
"
matlab says:"??? Error using ==> mpower
Matrix must be square.

Error in ==> fun1 at 7
t=(k*tms)/(((i/is)^n)-1)
"
thank you
 

Re: plotting with matlab

hi,
i will be thankful if you tell me what's the problem with this function?
"
function [t] = fun1(i)
tms=1;
is=100;
i=101:1:501;
k=0.14;
n=0.02;
t=(k*tms)/(((i/is)^n)-1)
loglog(i,t)
hold on
grid on
"
matlab says:"??? Error using ==> mpower
Matrix must be square.

Error in ==> fun1 at 7
t=(k*tms)/(((i/is)^n)-1)
"
thank you

Code:
function [t] = fun1(i)
tms=1;
is=100;
i=101:1:501;
k=0.14;
n=0.02;
[B]t=(k*tms)./(((i./is).^n)-1)[/B]
loglog(i,t)
hold on
grid on

 
  • Like
Reactions: nanock

    nanock

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top