Carl Love

Carl Love

27286 Reputation

25 Badges

11 years, 359 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk I realize that my plot is not what the OP was trying to plot. I was trying to illustrate that the warning message was unrelated to the failure to get a plot. Rather, the issue is as Preben suggested: the inability to evaluate the derivative of abs that appears in the OP's function.

@Markiyan Hirnyk I realize that my plot is not what the OP was trying to plot. I was trying to illustrate that the warning message was unrelated to the failure to get a plot. Rather, the issue is as Preben suggested: the inability to evaluate the derivative of abs that appears in the OP's function.

@Markiyan Hirnyk If you were asking the question to be Socratic with the OP, then I am sorry for interfering here. But if you really were asking because you didn't understand the OP's problem, then C = Limit(z(t), t= infinity).

@Joe Riel I'm glad you switched to using has. Your prior procedure for backtracking for the previously used vertices was taking the vast majority of your cpu time. I will run a comparison.

Edit: I ran the comparison, and your most recent linked-list version does use less memory. The run times are about the same, more-or-less depending on when the garbage collection kicks in. I'll have to run with some bigger examples to even out the gc()s.

One potential drawback to the linked lists is the need to flatten them for most practical uses.

@Joe Riel I'm glad you switched to using has. Your prior procedure for backtracking for the previously used vertices was taking the vast majority of your cpu time. I will run a comparison.

Edit: I ran the comparison, and your most recent linked-list version does use less memory. The run times are about the same, more-or-less depending on when the garbage collection kicks in. I'll have to run with some bigger examples to even out the gc()s.

One potential drawback to the linked lists is the need to flatten them for most practical uses.

I don't think that there is any easy way to add a second horizontal axis. You'd just have to fake it by plotting line segments and using textplot for the tickmark labels. However, note that the tickmarks and the tickmark labels on any actual axis can be changed relatively easily. What is printed for the tickmark labels does not need to correspond numerically to what is in the plot. Indeed, the tickmark labels don't even have to be numbers. So, you could modify the one existing horizontal axis to reflect whatever scale you want.

If you wish to persue this, please post the question in a fresh thread.

I don't think that there is any easy way to add a second horizontal axis. You'd just have to fake it by plotting line segments and using textplot for the tickmark labels. However, note that the tickmarks and the tickmark labels on any actual axis can be changed relatively easily. What is printed for the tickmark labels does not need to correspond numerically to what is in the plot. Indeed, the tickmark labels don't even have to be numbers. So, you could modify the one existing horizontal axis to reflect whatever scale you want.

If you wish to persue this, please post the question in a fresh thread.

@Markiyan Hirnyk I spent a few hours thinking about the problem while washing dishes and doing laundry. Mostly I thought about how I could apply the LogicProblem package to it. I am very familiar with that package, because I wrote it. But I have not used it in eight years, so the details are not sharp in my mind. Eventually I decided that this problem was not suited for that package.

I view this problem immediately as a combinatorics problem---more specialized than simply logic. Combinatorics is very close to graph theory. Also, the symmetry of 12 and 5 together is very appealing to me (think of dodecahedra). Once I considered using graph theory, the way to do the problem was obvious to me.

How did you do the problem? Finding 3-cliques in this problem is easy, even just by hand and without using a graph. The hard thing is proving that there are no 4-cliques.

@Markiyan Hirnyk I spent a few hours thinking about the problem while washing dishes and doing laundry. Mostly I thought about how I could apply the LogicProblem package to it. I am very familiar with that package, because I wrote it. But I have not used it in eight years, so the details are not sharp in my mind. Eventually I decided that this problem was not suited for that package.

I view this problem immediately as a combinatorics problem---more specialized than simply logic. Combinatorics is very close to graph theory. Also, the symmetry of 12 and 5 together is very appealing to me (think of dodecahedra). Once I considered using graph theory, the way to do the problem was obvious to me.

How did you do the problem? Finding 3-cliques in this problem is easy, even just by hand and without using a graph. The hard thing is proving that there are no 4-cliques.

@arctica1963 Your expression for Zsubload has an extra factor of "rho". Take out the (rhoload - rhowater) in front. Note that each term of the complicated coefficient at the end already contains a "rho" factor.

Just a guess, but do these formulae have to do with airplane radio interference caused by power transmission cables?

@arctica1963 Your expression for Zsubload has an extra factor of "rho". Take out the (rhoload - rhowater) in front. Note that each term of the complicated coefficient at the end already contains a "rho" factor.

Just a guess, but do these formulae have to do with airplane radio interference caused by power transmission cables?

Is the x^0 term (the "constant" term) of the series supposed to set to zero also?

I see both uppercase Omega and lowercase omega in your formula, both always squared. Is that a typo, or do they represent different things?

That's an image, not plain text. Either upload a worksheet, or plain text.

@arctica1963

We can get a fairly close replica of the SCILAB plot like this: First, define a scaling function:

kscale:= k-> k/XKINT*0.001;

Then use this plot command:

plot(
   Zuncomp@kscale, 0..0.8
  ,labels= ["Wavenumber k (1/km)", "Free-air admittance"]
 , labeldirections = [horizontal, vertical]
  ,color = green, linestyle = dash
  ,view = [0..1, -30..80]
  ,axes = boxed, gridlines, legend = ["Uncompensated"], legendstyle = [location = top]
);

Note in particular that the first argument is Zuncomp@kscale. The `@` represents functional composition. Also note that the second argument, 0..0.8, is simply a range rather than variable= range. That is necessary because the first argument is now a function rather than an expression. In other words, it doesn't depend on k anymore. I got the 0.8 from the SCILAB plot. If for didactic reasons you need the upper limit expressed in terms of npts, then we can work on that. Let me know how it goes.

 

@arctica1963

We can get a fairly close replica of the SCILAB plot like this: First, define a scaling function:

kscale:= k-> k/XKINT*0.001;

Then use this plot command:

plot(
   Zuncomp@kscale, 0..0.8
  ,labels= ["Wavenumber k (1/km)", "Free-air admittance"]
 , labeldirections = [horizontal, vertical]
  ,color = green, linestyle = dash
  ,view = [0..1, -30..80]
  ,axes = boxed, gridlines, legend = ["Uncompensated"], legendstyle = [location = top]
);

Note in particular that the first argument is Zuncomp@kscale. The `@` represents functional composition. Also note that the second argument, 0..0.8, is simply a range rather than variable= range. That is necessary because the first argument is now a function rather than an expression. In other words, it doesn't depend on k anymore. I got the 0.8 from the SCILAB plot. If for didactic reasons you need the upper limit expressed in terms of npts, then we can work on that. Let me know how it goes.

 

First 683 684 685 686 687 688 689 Last Page 685 of 700