## 100 Reputation

5 years, 121 days

## zcoloring in colorscheme...

Maple 2016

Hello everyone!

I'm interesting in "zcoloring" funciton in colorscheme option.

I wrote simple programm which compares two results: spectrogram of signal drawn with "colormap" list and spectrogram which was plotted with zcoloring function. I use red, green, blue functions to construct JET-colormap: list and expressions in "zcoloring".

My result:

As I understand, when I use:

`colorscheme = ["zcoloring", [z-> Red color function(z), z-> Green color function(z), z-> Blue color function(z)], colorspace = "RGB"]`

Maple plots z-value with color RGB color coordinates defined from "zcoloring". For example, if "zcoloring" is

`colorscheme = ["zcoloring", [z-> 5*z, z-> 3*z, z-> 2*z], colorspace = "RGB"]`

and z value is 10, then 10 value will correspond [50,30,20]-RGB color.

My test program:

Spectrogram_zcoloring.mw

Spectrogram of my test signal:

list_test.txt

## Power spectral density and coherence...

Maple

Hello everyone!
I wrote proc for Spectral density estimation using Welch's method.

And I want to understand wich fuction is better for computation of Cross-correlation: SignalProcessing:-CrossCorrelation or Statistics:-CrossCorrelation?

Here is my programm with simple signal exmaples:

P.S. (7 hours after initial question) I've just found several mistakes in my PSDw-proc in overlapping.

So, I uploaded new version of my programm. But now I'm not sure in unit of measurement  of power spectral density, but algorithm works correctly.

Spectral_density-test-correct.mw

## How to stop algorithm executing?...

Maple

Hello!

I im interesting  how to stop executing algorithm if user chose "cancel" in maplet filedialog?

```restart;
maplet:=Maplet(FileDialog['FD1']('filefilter' = "*.txt,*.m",
'filterdescription' = "TXT-files and Maple m-files",
'directory'= "D:\\NIR\\Experimental result\\Data\\",
'onapprove' = Shutdown(['FD1']), 'oncancel' = Shutdown())):
Maplets[Display](maplet):
f1:=%[1];
#Point to stop executing
a := 1;
b := 2;
```

## Plotranges and colormap...

Maple

Hello everyone!

I have several problems with listcontplot.

First of all, when I plot spectrogram of my test signal I get correct result. I use colorscheme = ["#00007F", "Blue", "#007FFF", "Aqua", "#7FFF7F", "Yellow", "coral", "Red"] as colormap. But I can't understand how to set option coloring in listcontplot correctly to obtain same result, because coloring works as Gradient from ColorTools.

Secondly, I use subs to change plot ranges. My apprach consist in several steps:

plot( listdensityplot(...) );
temp := plottools:-getdata(%, 'rangesonly');
subs(temp[1] = NewX0 .. NewX1, temp[2] = NewY0 .. NewY1, listdensityplot(...) );

Is it possible to simplify this solution?

P.S. My test programm with test data.

Maple_s_test.mw

Test.txt

My Spectrograms:

## From "HSV" colormap to "cold-to-hot" col...

Maple

Hello!

I have a question about densityplot.

I want to get this colormap:

As I understand, I should use plots:-densityplot(...) comand and "HSV" colorscheme, where H = [240..0], S=1, V=1.

But if i use zcoloring with this options, I will get wrong result.

My code:

restart;

a := 0; b := 1; #first and final point

plots:-densityplot(z, dummy = 0 .. 1, z = a .. b, grid = [2, 10], size = [90, 100], colorscheme = ["zcoloring", [proc (z) options operator, arrow; -240*(z-a)/(b-a)+240 end proc, proc (z) options operator, arrow; 1 end proc, proc (z) options operator, arrow; 1 end proc], colorspace = "HSV"], style = surface, axes = frame, labels = ["", ""], axis[1] = [tickmarks = []], title = "Test", titlefont = ["Calibri", "Bold", 16], axesfont = ["Arial", 14], size = [100, 500]); #densityplot with zcoloring option.

My result (zero must be equal to "Blue"):

I can't find mistake....

 1 2 3 Page 1 of 3
﻿