So for say 7^-1 mod 192

It needs to be simple code i can just type into the ti nspire program's by hand. ]]>

I found a thread that discussed this same topic (t-1188128) but I don't know anything about programming for the TI. One of the comments suggested a string for taking in multiple values which would be ideal.

Some help with quickly picking up the syntax on the TI would be appreciated. I plan to write more programs after this one so with these basics I should be able to develop with more ease.

]]>For example, if I put 5+4 in cell a1, and I then refer to a1, I retrieve 9. However, it would be far more helpful to me if I could actually retrieve "5+4" (getting it as a string or an expression would be fine, either way).

Does anyone know of a way to do this?

Many thanks! :-)

]]>I have made a table in excel, copied it to spreadsheet, but I don't know how to call single cell values from it

I have named both columns (A and B)

When I am in calculator tab, A is a list, and B too.

If I input A(0) or A(0,1) or something like this, prompts an error with "The name is not a function"

And I would also want to use those values in a program, but I don't know how to call those values from the program.

Thanks in advance

]]>I've completed one of the alphabetically first commands, and, with the hope of it being a bit of an example for future pages (though if you have any suggestions or improvements feel free to deviate). Most of the formatting matches the TI reference manual for consistency. I'm going to do my best to create a few pages each day whenever possible, as it doesn't take much to get one started. Anybody who is available to help with this endeavor, please consider working on the index. Going alphabetically is easiest.

I hate that there is a whole section of this wiki that is effectively blank, and I think we can easily fix that.

]]>I am new to TI BASIC (I recently bought my calculator). I tried to integrate the following simple user defined function, but got error "Error: A test did not resolve to TRUE or FALSE"

` ``Define LibPub test(x)= Func If x<1 Return x Return (x-1)^2+1 EndFunc`

The function is non-singular, continuous and works fine (you can calculate it for any value of argument x) until you plug it into numerical integration function nInt(…) to calculate its integral say from 0 to 5.

` ``nInt(test(x),x,0,5)`

The result will be

` ``"Error: A test did not resolve to TRUE or FALSE"`

This error is triggered by "If" statement. If the user defined function does not contain "If" statement, it can be used as an argument of nInt(…).

Am I doing something wrong or "If" statement is really prohibited in the user defined function which is used in nInt(..)?

Thank you.

]]>Prgm

:Local i,ele,a1,b1,c1,d1,t1,t2,r

:Request "Compuesto=",ele

:i:=1

:While ele≠nombre[i] and i<dim(nombre)

:i:=i+1

:EndWhile

:If ele=nombre[i] Then

:a1:=constante_a[i]

:b1:=constante_b[i]

:c1:=constante_c[i]

:d1:=constante_d[i]

:Request "T1=",t1

:Request "T2=",t2

:

:8.314*∫(a1+b1*10^(−3)*t+c1*10^(−6)*t^(2)+d1*10^(5)*t^(−2),t,t1,t2)→r

:Disp "Cp(Joule)=",r

:Else

:Disp " No encontrada"

:EndIf

:EndPrgm ]]>

Just as the question says above, how exacly is it implemented on the older blue Ti-Nspire with clickpad?

Does the ARM CPU emulate the z80 of the TI-84 or does the calculator have the CPU on the board itself that's shut down and not used in Nspire mode?

The 84 pad seems a bit heavier than the clickpad itself, so would I be right in thinking that the z80 and some memory chips might be housed in this?

I've been trying to find this answer all over but I've not had much luck finding any details.

Thank you

]]>` ``Define LibPriv goldenselection(f,xl,xu,it)= Func :Local f,xl,xu,d,x1,x2,ea,es,i,it,xint,xopt,r1,r2 :Define f(x)=f :Define es=0.001 :Define ea=1 :Define i=0 :Define d=(((1+√(5))/(2))-1)*(xu-xl) :Define x1=xl+d :Define x2=xu-d :While it>i : Define xint=xu-xl : If f(1)<f(2) Then : Define xopt=x1 : Define xl=x2 : Define x2=x1 : Define x1=xl+(((1+√(5))/(2))-1)*(xu-xl) : Else : Define xopt=x2 : Define xu=x1 : Define x1=x2 : Define x2=xu-(((1+√(5))/(2))-1)*(xu-xl) : EndIf : Define i=i+1 : Define ea=(2-((1+√(5))/(2)))*abs(((xint)/(xopt))) :EndWhile :Disp ea :Disp xopt :Disp i :EndFunc`

Ported matlab code

` ``function GS = goldenselection2(gs,xl,xu,it) syms x gs(x)=gs es=0.0001; ea=1; i=0; d=(((1+sqrt(5))/(2))-1)*(xu-xl); x1=xl+d; x2=xu-d; while it>i xint=xu-xl; if gs(x1)<gs(x2) xopt=x1; xl=x2; x2=x1; x1=xl+(((1+sqrt(5))/(2))-1)*(xu-xl); else xopt=x2; xu=x1; x1=x2; x2=xu-(((1+sqrt(5))/(2))-1)*(xu-xl); end i=i+1; ea=(2-(((1+sqrt(5))/(2))))*abs(((xint)/(xopt)))*100; end fprintf('ea %f\n',ea) fprintf('xopt %f\n',xopt) fprintf('iterations %f\n',i) end`

[Posts Merged by Moderator]

]]>Define efieldui()=

Prgm

:Local morecharge,i

:charge:={}

:chargeloc:={}

:morecharge:=true

:i:=0

:While morecharge

:Request "Enter Charge(C): ",charge[i] <--INDEX OUT OF BOUND

:Request "Enter Location: ([ [_{ ] [} ] [,, ]])",chargeloc[i] <- HERE IS THE ERROR:

:Request "Is that all the charge? (1 or 0)",morecharge

:i:=i+1

:EndWhile

:Local calculation,location,efield

:efield:=[[0][0][0]]

:calculation:=true

:i:=0

:While calculation

:Request "Enter location of E (Vector) : ",location

:While i<dim(charge)

:efield:=efield+efield(charge[i],chargeloc[i],location)

:EndWhile

:EndWhile

:EndPrgm

So in summary, I need help with inserting new element to a list on TI Nspire.

]]>I hope i explained myself well enough, i'm not an english native, sorry for grammar

Thanks :)

]]>i am trying to create a function that will use another function in mylib to do part of the calculation.

so far i have no luck.

i have a function "rot" in mylib who do the rotaion matrix.

i am trying to function that will do rotated tensor which will need function rot to be part of the calculation, rot didnt get recognized as a function but a text.

any pointer will be great.

]]>function [Q,V,R]=MSA(D)

m=D.m;n=D.n;Ni=zeros(12,12,m);S=zeros(6*n);Pf=S(:,1);Q=zeros(12,m);Qfi=Q;Ei=Q;

for i=1:m

H=D.Con(:,i);C=D.Coord(:,H(2))-D.Coord(:,H(1));e=[6*H(1)-5:6*H(1),6*H(2)-5:6*H(2)];c=D.be(i);

[a,b,L]=cart2sph(C(1),C(3),C(2));ca=cos(a);sa=sin(a);cb=cos(b);sb=sin(b);cc=cos(c);sc=sin(c);

r=[1 0 0;0 cc sc;0 -sc cc]*[cb sb 0;-sb cb 0;0 0 1]*[ca 0 sa;0 1 0;-sa 0 ca];T=kron(eye(4),r);

co=2*L*[6/L 3 2*L L];x=D.A(i)*L^2;y=D.Iy(i)*co;z=D.Iz(i)*co;g=D.G(i)*D.J(i)*L^2/D.E(i);

K1=diag([x,z(1),y(1)]);K2=[0 0 0;0 0 z(2);0 -y(2) 0];K3=diag([g,y(3),z(3)]);K4=diag([-g,y(4),z(4)]);

K=D.E(i)/L^3*[K1 K2 -K1 K2;K2' K3 -K2' K4;-K1 -K2 K1 -K2;K2' K4 -K2' K3];

w=D.w(:,i)';Qf=-L^2/12*[6*w/L 0 -w(3) w(2) 6*w/L 0 w(3) -w(2)]';Qfs=K*T*D.St(e)';

A=diag([0 -0.5 -0.5]);B(2,3)=1.5/L;B(3,2)=-1.5/L;W=diag([1,0,0]);Z=zeros(3);M=eye(12);p=4:6;q=10:12;

switch 2*H(3)+H(4)

case 0;B=2*B/3;M(:,[p,q])=[-B -B;W Z;B B;Z W];case 1;M(:,p)=[-B;W;B;A];case 2;M(:,q)=[-B;A;B;W];

end

K=M*K;Ni(:,:,i)=K*T;S(e,e)=S(e,e)+T'*Ni(:,:,i);Qfi(:,i)=M*Qf;Pf(e)=Pf(e)+T'*M*(Qf+Qfs);Ei(:,i)=e;

end

V=1-(D.Re|D.St);f=find(V);V(f)=S(f,f)\(D.Load(f)-Pf(f));R=reshape(S*V(:)+Pf,6,n);R(f)=0;V=V+D.St;

for i=1:m

Q(:,i)=Ni(:,:,i)*V(Ei(:,i))+Qfi(:,i);

end

I'd like to "translate" this code to run it on my TI-nspire CAS calculator.

]]>\begin{align} \frac{d}{dx}3tan(6x) \end{align}

Will display as the answer

(2)\begin{align} \frac{18}{(cos(6x))^2} \end{align}

Instead of simplifying the expression to

(3)\begin{equation} 18sec^2(6x) \end{equation}

Is there anyway to express trig functions in their simplest form?

]]>So my function looks like this

"t=fucntion, a₀=lower limit, b₀=upper limit, m=variable we integrate with respect to "

` ``Define LibPub doub_int(t,a₀,b₀,m)= Prgm expr("f(x,y):="&string(t)) fy(x,y):=∫(f(x,y),m,a₀,b₀) Disp fy(x,y) EndPrgm`

When plugging in values doub_int(2x*y^2,1,x,y) (regardless of what I set "a₀" or "b₀" to) I get this every time

((−2*(a₀-b₀)*x^(2))/(a₀*b₀))-a₀^(2)+b₀^(2)

I also know the above is not the entire double integral process. I am just using the above to show how this is failing to pass values. Do I need to pass values using a pointer or something. Please anything could help.

]]>2 + addnum(3,4)

The above expression returned 9.

Is it possible to make Lua programs or functions that can be invoke as part of an expressions like the above? All the Lua programs I have seen have its own GUI and its own method of accepting input.

]]>