error with intial conditions for ode45
Hi I have a problem in differentiating my equ. my .m file is function [t,xdot] = formdiffeq(t,XX,h,BB,A) x=zeros(1,6); y=zeros(1,6); d=zeros(6); s=zeros(6); l=zeros(6); k=zeros(1,6); %i use all these variables to calculate 'l' L=kron(l,eye(4)); xdot=A*XX+BB*L*(XX-h); end and in the command window I ... 15 Mar 2010 12:19
Pi approximation function optimization
I came across the "brain teaser" of finding the best approximation of pi by dividing one 9-digit number by another 9-digit number. Both numbers contain 1 through 9 once. I found a very close approximation by hand (728691345 / 231948765 = 3.141604763) but I want to know if there are any better ones. I've tried a ... 11 Apr 2010 16:48
Pi approximation function optimization
I came across the "brain teaser" of finding the best approximation of pi by dividing one 9-digit number by another 9-digit number. Both numbers contain 1 through 9 once. I found a very close approximation by hand (728691345 / 231948765 = 3.141604763) but I want to know if there are any better ones. I've tried a ... 12 Mar 2010 21:47
viewing structure arrays
I am trying to view my structure array but matlab just returns: str = 1x9 struct array with fields: name boss how can I see the values? Thanks ... 15 Mar 2010 11:11
dataset help
I've just started using the dataset type from the Statistics toolbox, and I've found it quite useful. I'm having some problems though with some basic manipulation. As an example, snames = nominal({'setosa';'versicolor';'virginica'}); CC = dataset({snames,'species'},{[38;108;70],'cc'}) 1) How can I convert chose... 15 Mar 2010 15:49
sign test, polarity
Hi Does anyone know if there's a function in matlab that compares the sign of two values? i.e it checks if they are both negative or positive? Bayo ... 12 Mar 2010 20:39
how to judge if an arc of a great circle crosses a quadrangle and calculate the positions of the intersects of on a sphere surface
On Mar 13, 11:34 am, "Roger Stafford" <ellieandrogerxy...(a)mindspring.com.invalid> wrote: "Ha " <scifi...(a)126.com> wrote in message <hnd5rr$4e...(a)fred.mathworks.com>... The story below happens on Earth surface. There is an arc of a great circle (AB), the two endpoints of which are placed at (latA,lonA) ... 12 Mar 2010 19:32
Matlab location function
Hello, Does anyone know if Matlab has a built in location function? Something that would print current geographic coordinates to the screen. Sort of like the clock function, but with space? Thanks ... 12 Mar 2010 23:58
How can I create my own workspace?
Hello, What I mean is, how can I transfer the workspace and all its variables (including loop counters and toc) from a nested function, for example, and make it available in another function? ... 15 Mar 2010 12:19
Matlab acker(A,B,p) method
Hi, will acker method return the G matrix of Luenberger observer? I have used this method to obtain G, then calculated the F (F = A - G*C) and i have state space equation of Luenberger's Observer x(t)' = Fx(t) + Bu(t) + Gy(t). But for my object(three tanks connected in series) this observer shows totally wrong sta... 12 Mar 2010 17:18