Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Help in using 'ezplot' !!!

Subject: Help in using 'ezplot' !!!

From: Animesh Pandey

Date: 4 Mar, 2011 13:11:04

Message: 1 of 1

clc
syms an bn a0;
syms t n;
syms x;

T = input('Enter the Time Period: ');
N = input('Enter the number of terms: ');
x = input('Enter the function: ');
f = @(t) x;

an = int(f(t).*cos(n*pi*t/T),t,-T,T)*(1/T);
bn = int(f(t).*sin(n*pi*t/T),t,-T,T)*(1/T);
a0 = int(f(t),t,-T,T)*(1/T);
y = a0;

pretty(a0);
pretty(an);
pretty(bn);

for i=1:1:N;
     y = y + subs(an, i).*cos(2*pi*i*t/T) + subs(bn, i).*sin(2*pi*i*t/T);
end
pretty(y);
eval(y)
ezplot(y)

Whenever I use eplot for plotting 'y' I get the following error....
Please hep me remove this error !!!
--------------------------------------------------------------------------------------------------
??? Error using ==> exist
Directory name too long:
@5734161139222659/9007199254740992*sin(2*pi*t)-5734161139222659/18014398509481984*sin(4*pi*t)+1911387046407553/9007199254740992*sin(6*pi*t)-5734161139222659/36028797018963968*sin(8*pi*t)+4587328911378127/36028797018963968*sin(10*pi*t)-1911387046407553/18014398509481984*sin(12*pi*t)+6553327016254467/72057594037927936*sin(14*pi*t)-5734161139222659/72057594037927936*sin(16*pi*t)+5097032123753475/72057594037927936*sin(18*pi*t)-4587328911378127/72057594037927936*sin(20*pi*t)+521287376292969/9007199254740992*sin(22*pi*t)-1911387046407553/36028797018963968*sin(24*pi*t)+441089318401743/9007199254740992*sin(26*pi*t)-6553327016254467/144115188075855872*sin(28*pi*t)+3058219274252085/72057594037927936*sin(30*pi*t)\5734161139222659/9007199254740992*sin(2*pi*t)-5734161139222659/18014398509481984*sin(4*pi*t)+1911387046407553/9007199254740992*sin(6*pi*t)-5734161139222659/36028797018963968*sin(8*pi*t)+45
87328911378127/36028797018963968*sin(10*pi*t)-1911387046407553/18014398509481984*sin(12*pi*t)+6553327016254467/72057594037927936*sin(14*pi*t)-5734161139222659/72057594037927936*sin(16*pi*t)+5097032123753475/72057594037927936*sin(18*pi*t)-4587328911378127/72057594037927936*sin(20*pi*t)+521287376292969/9007199254740992*sin(22*pi*t)-1911387046407553/36028797018963968*sin(24*pi*t)+4.

Error in ==> ezfcnchk at 51
   e = exist(inx);

Error in ==> ezplot at 86
   [f,fx0,varx] = ezfcnchk(f);

Error in ==> sym.ezplot at 46
   h = ezplot(f.s);
--------------------------------------------------------------------------------------------------

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us