Hello Everyone,
Can you please help me with this error.. I am not sure what is wrong
with it. It gives me this error for the line:
Area=eval(int(exp(-alpha*(t-tau))*e_array(i,:),tau,0,t));
I will really appreciate it of someone tell me how to fix it.
??? Error using ==> sym.maple
Error, (in int/definite/improper) integer too large in context
Thanks
Sam
integer too large in context
Started by ●December 5, 2005
Reply by ●December 13, 20052005-12-13
Hello group,
I am kinda new in matlab and trying to calculate and plot the Electro Magnetic Field from 5 to 100 cm from the center of a charged ball in steps of 5 cm.I have done the paper work and I tried to plot it with MATLAB but I get an error. Here is my codes and the error I get:
pv = .3;
Er = 2.7;
Eo = 8.85*10^(-12);
Q1 = pv*(4/3)*pi*(.005)^3; %R < 13
Q2 = pv*(4/3)*pi*(.01)^3; %R < 13
Q3 = pv*(4/3)*pi*(.013)^3; %R > 13
r:5:100;
E3 = Q3/((4*pi*r.^2)*Er*Eo);
i=5:5:100;
E1 = Q1/(4*pi*5.^2*Eo);
E2 = Q2/(4*pi*10.^2*Eo);
E= [E1 E2 E3];
plot(i,E)
Any help will be greately appreciated.
Haidar
I am kinda new in matlab and trying to calculate and plot the Electro Magnetic Field from 5 to 100 cm from the center of a charged ball in steps of 5 cm.I have done the paper work and I tried to plot it with MATLAB but I get an error. Here is my codes and the error I get:
pv = .3;
Er = 2.7;
Eo = 8.85*10^(-12);
Q1 = pv*(4/3)*pi*(.005)^3; %R < 13
Q2 = pv*(4/3)*pi*(.01)^3; %R < 13
Q3 = pv*(4/3)*pi*(.013)^3; %R > 13
r:5:100;
E3 = Q3/((4*pi*r.^2)*Er*Eo);
i=5:5:100;
E1 = Q1/(4*pi*5.^2*Eo);
E2 = Q2/(4*pi*10.^2*Eo);
E= [E1 E2 E3];
plot(i,E)
Any help will be greately appreciated.
Haidar
Reply by ●December 15, 20052005-12-15
Hello,
I have modified
the code and now its working.In your definiton r is a row vector.So square the
elements of r first and then apply the division with the constant factor (val1)
as shown below.I have plotted it from 15 to 100cm insteps of 5cm.The modified
code is given below,
pv = .3;
Er = 2.7;
Eo = 8.85*10^(-12);
Q3 = pv*(4/3)*pi*(.013)^3; %R > 13
Er = 2.7;
Eo = 8.85*10^(-12);
Q3 = pv*(4/3)*pi*(.013)^3; %R > 13
r:5:100;
val=r.^2;
val=r.^2;
val1=Q3/(4*pi*Er*Eo);
E3 = val1./val;
E3 = val1./val;
plot(r,E3)
bye
gokul
----- Original Message -----From: heidar mhrTo: semsem771 ; m...@yahoogroups.comSent: Wednesday, December 14, 2005 12:51 AMSubject: [matlab] Matrix dimension error!Hello group,
I am kinda new in matlab and trying to calculate and plot the Electro Magnetic Field from 5 to 100 cm from the center of a charged ball in steps of 5 cm.I have done the paper work and I tried to plot it with MATLAB but I get an error. Here is my codes and the error I get:
pv = .3;
Er = 2.7;
Eo = 8.85*10^(-12);
Q1 = pv*(4/3)*pi*(.005)^3; %R < 13
Q2 = pv*(4/3)*pi*(.01)^3; %R < 13
Q3 = pv*(4/3)*pi*(.013)^3; %R > 13
r:5:100;
E3 = Q3/((4*pi*r.^2)*Er*Eo);
i=5:5:100;
E1 = Q1/(4*pi*5.^2*Eo);
E2 = Q2/(4*pi*10.^2*Eo);
E= [E1 E2 E3];
plot(i,E)
Any help will be greately appreciated.
Haidar
Reply by ●December 15, 20052005-12-15
Hello
you have very little mistake! only 1 DOT
pv = .3;
Er = 2.7;
Eo = 8.85*10^(-12);
Q1 = pv*(4/3)*pi*(.005)^3; %R < 13
Q2 = pv*(4/3)*pi*(.01)^3; %R < 13
Q3 = pv*(4/3)*pi*(.013)^3; %R > 13
r:5:100;
E3 = Q3./((4*pi*r.^2)*Er*Eo);
i=5:5:100;
E1 = Q1/(4*pi*5.^2*Eo);
E2 = Q2/(4*pi*10.^2*Eo);
E= [E1 E2 E3];
plot(i,E)
8 -0800 (PST)
From: heidar mhr
Subject: Matrix dimension error!
Hello group,
I am kinda new in matlab and trying to calculate and plot the Electro Magnetic Field from 5 to 100 cm from the center of a charged ball in steps of 5 cm.I have done the paper work and I tried to plot it with MATLAB but I get an error. Here is my codes and the error I get:
pv = .3;
Er = 2.7;
Eo = 8.85*10^(-12);
Q1 = pv*(4/3)*pi*(.005)^3; %R < 13
Q2 = pv*(4/3)*pi*(.01)^3; %R < 13
Q3 = pv*(4/3)*pi*(.013)^3; %R > 13
r:5:100;
E3 = Q3/((4*pi*r.^2)*Er*Eo);
i=5:5:100;
E1 = Q1/(4*pi*5.^2*Eo);
E2 = Q2/(4*pi*10.^2*Eo);
E= [E1 E2 E3];
plot(i,E)
Any help will be greately appreciated.
Haidar
you have very little mistake! only 1 DOT
pv = .3;
Er = 2.7;
Eo = 8.85*10^(-12);
Q1 = pv*(4/3)*pi*(.005)^3; %R < 13
Q2 = pv*(4/3)*pi*(.01)^3; %R < 13
Q3 = pv*(4/3)*pi*(.013)^3; %R > 13
r:5:100;
E3 = Q3./((4*pi*r.^2)*Er*Eo);
i=5:5:100;
E1 = Q1/(4*pi*5.^2*Eo);
E2 = Q2/(4*pi*10.^2*Eo);
E= [E1 E2 E3];
plot(i,E)
8 -0800 (PST)
From: heidar mhr
Subject: Matrix dimension error!
Hello group,
I am kinda new in matlab and trying to calculate and plot the Electro Magnetic Field from 5 to 100 cm from the center of a charged ball in steps of 5 cm.I have done the paper work and I tried to plot it with MATLAB but I get an error. Here is my codes and the error I get:
pv = .3;
Er = 2.7;
Eo = 8.85*10^(-12);
Q1 = pv*(4/3)*pi*(.005)^3; %R < 13
Q2 = pv*(4/3)*pi*(.01)^3; %R < 13
Q3 = pv*(4/3)*pi*(.013)^3; %R > 13
r:5:100;
E3 = Q3/((4*pi*r.^2)*Er*Eo);
i=5:5:100;
E1 = Q1/(4*pi*5.^2*Eo);
E2 = Q2/(4*pi*10.^2*Eo);
E= [E1 E2 E3];
plot(i,E)
Any help will be greately appreciated.
Haidar