tomleslie

13876 Reputation

20 Badges

15 years, 173 days

MaplePrimes Activity


These are replies submitted by tomleslie

@Muhammad Usman 

I used the command

DirectSearch[SolveEquations]([Eq[1], Eq[2], Eq[3], Eq[4]]);

but

The DirectSearch package is an add-on for Maple which is available from the Maple application centre, so strictly speaking it is not a Maple product. Last time I checked it was at http://www.maplesoft.com/applications/view.aspx?SID=101333. If it does not exist in your installation, then you will have to download/install/configure before you can use it.

The DirectSearch package overlaps quite a lot with a variety of existing Maple commands such as fsolve() and the inbuilt Optimization package, but often uses different algorithms - so can *sometimes* solve problems which cause difficulties for the built-in commands.

@one man 

Check the comment in my previous response where I state

"Residuals are a little on the high side, though"

Which part of this warning don't you understand?

With N:=infinity, your worksheet executes. The values for your final twelve integrals are

181.3333333333333333333333333333333333333333333333333333,
0.0,
0.0,
45.33333333333333333333333333333333333333333333333333333,
0.0,
0.0,
45.33333333333333333333333333333333333333333333333333333,
0.0,
0.0,
29/6250000,
0.0,
0.0

I have no idea whether this is what you expect - but you are going to have to tell me what you mean when you say

"i encounter with problem in next calculation"

Since you generally ignore my suggestions I'm not going to waste much time on thisand |I'm ceratily not writing anything to fix it becuase as we both know that is a completet waste of my time

When I execute the code for count.mw, it produces the output

ics := q(0) = 1, p(0) = 1
sol:=[t=proc(t) ... end proc,p=proc(t) ... end proc,q=proc(t) ... end proc]
q:=proc(t) ... end proc
ics := 1. = 1, p(0) = 501/500

Error, (in dsolve/numeric/process_input) invalid specification of initial conditions, got HFloat(1.0) = 1

I'll break it down for you a little

first iteration of 'for' loop;       ics := q(0) = 1, p(0) = 1
first iteration of 'for' loop;       sol:=[t=proc(t) ... end proc,p=proc(t) ... end proc,q=proc(t) ... end proc]
first iteration of 'for' loop;       q:=proc(t) ... end proc
second iteration of 'for' loop;   ics := 1. = 1, p(0) = 501/500

Now I suggest that you read this last line very carefully, and consider whether the first boundary condition 1. = 1 is what you want. It isn't so I suggest you fix it

@Preben Alsholm 

Sorry Preben,

You answer must have appeared between the time I started typing and the time I hit the submit button -otherwise I wouldn't have bothered

rgds

If you can't mak Kitonum's suggestion work, then I have added an execution group to your original worksheet which ought to be pretty simple to follow

odeSol.mw

Well you can solve for S(t) and K(t) numerically, but no-one here can, because you do not give values for all the parameters.

Assuming that you can do this numerically, then it is relatively trivial to set up functions K(t), S(t) which will evaluate for any values of t.

Then, as suggested by Kitonum, your algebraic equation can probably be solved using fsolve(), with or without some options This might be dependent on whether or not there are multiple solutions, whether the solution only occurs for some seriously wild value of t (say 1.0e1000 as an example). However since K(t) and S(t) can be evaluated numerically, then one can trivially plot your algebraic equation, to examine whether its solution is going to be problematic

I recommend that you provide sufficient information to generate numerical solutions - as in all parameter values as well as the boundary conditions.

The latest exoplanation is COMPLETE AND UTTER RUBBISH.

I strongly suggest that you type the arrow operator -> in the search box in Maple help, and read the associated page in order to determine just how laughably bad the stetement

F[n]:=0-> piecewise( q(300) > q(0),F[n]+1,F[n]):

actually is.

You have (of course) noticed that if you type this statement at a Maple prompt, you will immediately get a syntax error. And if you read the help page for the -> operator, you will realise why you are getting a syntax error. When you can write a simole function definition without producing a syntax error, let me know.

Once again your request is so badly phrased that I cannot work out what you want.

The code you supplied does not help much, since it consists of functions which are defined (and redefined within a loop), and none of these functions are ever called/evaluated with an argument. Why define functions which you never use?? Makes no sense!!

So once again I have to make a *wild* guess about what you are trying to describe/achieve. My guess is as follows

For a sequence of values ( in your test case) q(0), q(300), q(600), q(900), q(1200) ) determine whether the function q() has taken a "step" between these values, and what is the direction of this step.

My additions to your code achieve this

hw2corr4.mw

The matrix of output data is at temp[3] NB not not temp [3,1].

Your following comment makes little sense

I was able to manually "view" the variable and matrix and then hit export.rmation was x/l(t). So now I'm trying to multiply the output by the l(t) to put it back in the original coordinate system. This is the part I'm having a hard time doing. I tried to use the function to evaluate it at certain points but then I have to multiply the whole x coordinate by the l(t).

What is 'export.rmation'

What is x/I(t)?

Multiply what output by I(t)?

You are going to have to get a lot more precise about what you are trying to achieve, if you wnat any help.

First suggestion is read my prevous response very carefully. You obviously couldn't be bothered.

If you want a black-white decision, then do what I said earlier and investigate the 'scaletorange' option wih the range set at something like -1.0e-06..1.0e-06. This would be a pretty good representation of whether Profit[1] was bigger than Profit[2] or vice versa.

Before seekign further help, at least try to demonstrate that you are doing some work, rather than expecting someone else to absolutely everything for you.

You claim that you want

I am trying to plot 3d scattered data as a 2d scatterplot

so you want to produce a 2D plot - right?

You say that you want

the third dimension being displayed as colour or a line that separates the value of the two functions (for example, the higher value and lower value at that point)

So you want a 2D plot with the "color" value at an individual point representing the difference between Profit[1] and Profit[2] -right?

Attached is one possibility, where I have used a densityplot() to show the difference between the two functions in 2D as a colour. Well technically a gray scale: although you can uncomment one entry in the densityplot() command to get a colour representation

densPlot.mw

 

If it isn't in the manual, then it can't be done!

You shouldn't have to go via Excel:

exportMatrix( matrixNameInMaple, target=Matlab)

ought to get you to Matlab directly.

Still think you are are better to consider "single-software" solutions. I'm having a lot oif difficulty believing you have some data manipulation on this matrix which cannot be performed in Maple

Your best bet is probably going to be contourplot().(check the manual entry).  Since you do not give a clear defibition for the value in the third dimension, I can;t pride a meanigful example

First 160 161 162 163 164 165 166 Last Page 162 of 207