tomleslie

13876 Reputation

20 Badges

15 years, 173 days

MaplePrimes Activity


These are replies submitted by tomleslie

@Scot Gould 

other than looking pretty,  what "features" are available using 2- input which are not available using 1D-input?

@Madhukesh J K 

You make the claim

C,N,T,w are the similarity variables used in the problem 

The variables C,N,T,w occur nowhere in your worksheet, so the above statement is completely meaningless.

You then claim

a and v_f are constants

The names a and v_f  occur nowhere in your worksheet, so this statement is also completely meaningless

You further claim

Streamfunction plot is drawn eta vs x

The variable 'x' occurs nowhere in your worksheet, so this statement is also completely meaningless

In order to receive a sensible answer, you have the obligation to ask a sensible question!

@Carl Love 

I wish I'd thought of that!

The Maple helkp does explicitly state that it does not support "multibyte encoding", and yet the attached worksheet *appears" to show that the OP's desired character is a result of such "multibyte encoding", since the resulting glyph appears to map to some combination of ASCII values 152 and 195, neither of whihc (individually) appear to represent a "printable" glyph

Maple also states that it uses teh "8-bit ASCII" character, without ever specifying which one - there are many!. Some texts regard "8-bit ASCII" as conventional 7-bit ASCII, with a simple parity bit for error-checking purposes. I'm guessing that this is not the \Ample interpretation!

The most common alternative interpretatons of "8-bit ASCII" are either Windows-1252 or  ISO/IEC 8859-1, but AFAIK these are both single-byte encodings - ie one byte gives one glyph, and as the attached worksheet shows, it looks as if Maple is using some kind of multibyte encoding (evern if it claims that it isn't!!!)

Anyway, I'm now seriously confused and not making any progress, but you might want to play with the attached code

  restart:
  with(StringTools):
#]
# OP's original string
#
  a := "Øyeblikk";
#
# Convert the original string to "characters"
#
  Explode(a);
#
# Hmmm, it seems as if the leading'glyph' in the
# original string is actually two "characters", so what
# happens if one generates the subtring from these first
# two "characters? One gets the original (non-English)
# glyph
#
  SubString(a, 1..2);
#
# So what are the decimal ASCII equivalents of these
# first two "characters"

  Ord~(Explode(a))[1..2];
#
# Standard 7-bit ASCII only occupies decimal values 0..127
# so both 195 and 152 are outside this range. The problem
# with 8-bit ASCII is that it comes in a lot of "flavours"
# so although chracter codes 195 and 152 are defined, these
# representt individual 'glyphs', (neither of which correspond
# to the first 'glyph' in the OP's string.
#
# So it *seems* as if MAple is doing some kind of multibyte
# encoding.
#
# Out of idle curiosity, can one construct the OP's 'glyph'??
#
# It appears that one can!! Note that neither Char(195) nor
# Char(152) corrsponds to a "printable" character
#
  Char(152);
  Char(195);
  cat( Char(195), Char(152) );  
#
# So what character table is Maple using? Hmm nothing above
# ASCII-127 appears to be "printable
#
  seq( [j, Char(j)], j=0..255);

asciiStuff.mw

 

 

 

 

@Carl Love 

OP is (probably?) using an earlier version of Maple in which the 'seq' command was (a lot!) less flexible than it is now. Your code throws multiple errors in Maple 18 (NB Maple 18, not Maple 2018)

I have modified your code to change the offending 'seq' commands, and the code attached runs on Maple 18 and Maple 2020

seqProb.mw

see highlighting

restart:

G := proc(d)
 local n:
  global W:
  for n from 1 to nops(L) do
    W := [W[], cat~(W, L[n])[]];
  end do:
  while max(length~(W)) <= d do
    thisproc(d)
  end do:
end proc:


# Words of length not larger than LW which are made with at most NL letters

NL := 3:
L  := StringTools:-Char~([$65..65+NL-1]);
W  := L:
LW := 3:

G(LW):
sort(W)
                        ["A", "B", "C"]

                               3
["A", "AA", "AAB", "AABC", "AAC", "AB", "ABC", "AC", "B", "BA", 

  "BAB", "BABC", "BAC", "BB", "BBC", "BC", "C", "CA", "CAB", 

  "CABC", "CAC", "CB", "CBC", "CC"]
W  := L:

CodeTools:-Usage( G(16) ):
numelems(W);
memory used=310.70MiB, alloc change=321.53MiB, cpu time=3.10s, real time=2.27s, gc time=1.52s
                             786432

Also why doesn't (say) "AAA" qualify? There are lots of others which appear to be "missing" Isn't the following the complete list. Im not claiming that this is most efficient way to generate the list, just claridying your requirement

restart:
n:=3:
L  := StringTools:-Char~([$65..65+n-1]):
L2:=L $~ n:
sort( [seq( cat(k[]), k in seq( combinat:-permute(L2,j)[], j=1..n))]);
["A", "AA", "AAA", "AAB", "AAC", "AB", "ABA", "ABB", "ABC", "AC", 

  "ACA", "ACB", "ACC", "B", "BA", "BAA", "BAB", "BAC", "BB", 

  "BBA", "BBB", "BBC", "BC", "BCA", "BCB", "BCC", "C", "CA", 

  "CAA", "CAB", "CAC", "CB", "CBA", "CBB", "CBC", "CC", "CCA", 

  "CCB", "CCC"]


 

 

 

 

 

 

@Zeineb 

thatt there is some kind of "pattern" to both the intervals, and the functions defined on the intervals, one can use a seq() command.  Consider the "toy" example below

unapply(piecewise( seq( [x<j, x^j][], j=1..10), 0),x);

which produces

x -> piecewise(x < 1, x, x < 2, x^2, x < 3, x^3, x < 4, x^4, x < 5, x^5, x < 6, x^6, x < 7, x^7, x < 8, x^8, x < 9, x^9, x < 10, x^10, 0)

 

@666 jvbasha 

If you modify the original code slightly, by adding contourlabels=true option, as in

plots:-listcontplot( ExcelTools:-Import("C:/Users/TomLeslie/Desktop/XLdat.xlsx"),
                     filledregions=true,
                     levels=16,
                     contourlabels=true,
                     axis=[ tickmarks=[ seq(j=j/5-2.5, j=0..25,5) ] ]
                  );

the if you let the mouse "hover" ovea conour line you will see the contour value. I don't know of any way to actually permamently display the contour values on the plot itself - although I do recollect this question cropping up from time to time.

Have a look at

https://www.mapleprimes.com/posts/202222-Contour-Curves-With-Labels

or just enter Contour Labels in the Mapleprimes search box

 

@annamiaswart 

I overlooked the fact that having obtained solutions for h1(z), h2(x), h3(z), etc, you actually wanted to plot an expression such as ( diff(h1(z),z)+ diff(h2(z),z)+ diff(h3(z),z))/(h1(z) +h2(z) +h3(z))

I have added an execution group to my original worksheet which produces the curves of this expression for all eleven sets of boundary conditions. See the attached

odeData2.mw

@tomleslie 

I keep forgetting one can set the option adaptive=false, numpoints=200 to get round the variable step size issue.

However in the OP's case, using these options in the plot() command, followed by plottools:-getdata() still produces multiple 2D arrays, each of whose first columns is identical. Obviously the required output data can be obtained from these arrays, but I still think it is "simpler" to achieve the same the same thing by using the output=Array() option in the dsolve() command

@tomleslie 

The probelm with exporting directly to Excel is caused by the fact that for one set of boundary conditions (the last one), the dsolve() command generates a singularity warning and inserts the character `?` in the output Array for for z=6.7 and all subsequent z-values.

The existence of this character "upsets" the ExcelTools:-Export command ( but not ExportMatrix() )

@chrisc 

I will submit an SCR to Maple and it will (may?!) get fixed sometime

@chrisc 

it needs a bug report. Please take my previously posted worksheet

oddOne.mw

execute it on your machine, save the outcome, and post it here using the big green up-arrow in the Mapleprimes toolbar. This is the kind of evidence which is necessary to get people at Maple to take problems *seriously*

@ik74 

So you want to plot w(x,y,t) versus the independent variables x,y,t. So you have three independent variables, and you want to plot w() in the fourth dimension, on a 2-dimensional screen??

Now it is (more or less) possible to represent this by treating 'x', 'y', 't' as independent variables, defining the three axes of the plot, and then computing w(x,y,t), and using the latter to define the color of the plot at the point (x,y,t). Such plots are very difficult to interpret, unless you really (really) know what you are doing - and all indications so far indicate that you do not!

The attached deals with the "simpler" problems, such as how to determine

  1. the value of w(x,y,t) for any given values of x, y, t
  2. how to plot w(x,y,t) for a fixed value of x, with y, t varying and
  3. how to plot w(x,y,t) for a fixed value of y, with x, t varying

which is about as far as I'm prepared to go for the moment

bigodes4.mw

For reasons unknown, if you upload a Maple workbook here (ie a file with a .maple extension) no-one will be able to read it. So please use a standard workbook ( ie a file with a .mw extension)

Ensure that it includes the ode system you are trying to solve, ie eq2, eq3, eq4.

First 37 38 39 40 41 42 43 Last Page 39 of 207