I can solve an equation using Maxima by using the commands below.
kill(all);
A:A; phase:phase; solve(A*cos(2*pi*f*t+phase)=y,phase);
And it gives me the correct answer.
phase=acos(y/A)-2*f*pi*t
But when I try and solve for just the top portion of an equation the x(n+1) portion. Here's the equation.
See website Clifford Attractor.
It's not what I expected. The equation I use is below:
kill(all);
x:x; a:a; c:c; n:n; solve(sin(a*y(n))+c*cos(a*x(n))=x*(n+1),x);
What I get is :
x=(sin(a*y(n))+c*cos(a*x(n)))/(n+1)
I expected it to be something like:
x[n] = sin(a*y[n-1])+c*cos(a*x[n-1]);
Any idea what I'm doing wrong?
I'm using wxMaxima 18.02.0 in ubuntu 18.04 64bit
Related
This is my first post, and I am looking for some help in using Matlab or any easy way to solve the following equation.
This shows how the equation would look like:
Below is my code in Matlab:
Delta_T=5;
T_b=373;
rho_l=958;
rho_g=0.05956;
C_l=4217;
C_g=2029;
k=0.680;
L=2257E3;
R(:,:)=zeros;
pi=3.1415;
beta_0=1;
beta=fsolve((rho_l*C_l*Delta_T)/(rho_g(L+(C_l-C_g)*Delta_T))*
(1/integral((#ksi)exp(-beta_g^2*((1-ksi)^(-2)-2*(1-(rho_g/rho_l))*ksi-
1),0,1))),beta_0);
beta_g=sqrt(beta/2);
i have octave 4.2.0 and knew that it dont have this function implemented. I try to make a code, but it dosnt work. Can you please help me to fix it or are there ready codes, which i can use?
My code at the moment:
matrix=xlsread('path'); %predictors
Y=xlsread('path');
[K,J]=size(matrix);
mid=mean(matrix);
standard=std(matrix);
Jn=J-1;
for len= 1:K
for ll=1:J
Z(len,ll)=matrix(len,ll)-mid(ll))/standard(ll);
end
end
I=eye(J,J);
n=1;
for kfact=0:0.0001:0.5
teta(n,:)=inv(matrix'*matrix+kfakt*I)*matrix'*Y;
k(n)=kfakt;
n=n+1;
end
Have someone an idea, because i cant find how to make it?
I try to specify my problem. In the book are the values of the parameters, which are calculate in the dependece of k ver small (e.g. 0.02). I get Values, which are about 20. I dont understand why?
Thanks!
https://dev.socrata.com/docs/datatypes/number.html#, says that % and ^ can be used to get the modulo of one number divided by another number. I cannot get them to work and cannot find examples.
When I try ^ I appear to get exponentiation. Example:
http://data.cityofchicago.org/resource/pubx-yq2d.json?$select=streetnumberto,streetnumberfrom,(streetnumberto-streetnumberfrom)^100%20as%20address_length_in_blocks
When I try % itself, I get a "malformed" error, not so surprisingly. When I try the %25 code for %, I still get a "malformed" error but one that seems to suggest that it correctly inserted the % but does not know what it means. (I am restricted from posting more than two links but just replace the ^ above with % and %25.)
Can anyone help me get this working?
By the way, at the risk of mixing topics, I would ideally like to use an int or round sort of function but they do not seem to exist in SoQL so I was trying to back into getting the integer portion of dividing by 100.
Thank you.
Great question. I just tried it myself and I'm getting a malformed exception too, and it's definitely getting through to the query optimizer:
https://data.cityofchicago.org/resource/erhc-fkv9.json?totalfees=4160%20%25%2010.0
Note I'm using the SODA 2.1 version of that API, which I recommend you migrate to:
https://dev.socrata.com/foundry/#/data.cityofchicago.org/erhc-fkv9
I'll check with our engineering team and see what might be going on. I'll pass on the feature request for round, ceil, floor, etc as well.
Does anybody know the octave equivalent function to Matlab's pretty. I have tried the following
symbols
x = sym('x')
diff(sin(x)*cos(x),x)
pretty (ans)
I tried pretty(ans) in octave and it did not throw an error. Also, the answer output was not enhanced. I think the function pretty is automaticly called on the output in Octave.
I'm trying to solve a system of ODEs. I'm using the ode45d command like so:
[t,x] = ode45d(#f, (t = linspace(0,100,1000)'),
[sh0; ih0; rh0; sm0; lm0; im0; se0; ie0], [7], ones(8,1));
When I type the system of ODEs and this command in octave I get the right graph. The problem is that when I let the x-axis larger, the graph changes to something very strange.
When I let the domain of the ODEs bigger than 100, the only thing I get is a vertical line on the graph.
Is there someone who knows the function ode45d and its limitations, and who can tell me why this is happening?
Thanks in advance, and sorry for my English.