Spinosaurus

100 Reputation

4 Badges

5 years, 127 days

MaplePrimes Activity


These are replies submitted by Spinosaurus

@acer No. My main question is "solved".

But I discovered an interesting thing. If I use "zcoloring" in plots:-surfdata everything is OK. But if I use plots:-listdensityplot comand I obtain the following figure:

plots:-listdensityplot(res, style=patchnogrid, smooth=false,
colorscheme = ["zcoloring", [z -> r(f(z)), z -> g(f(z)), z -> b(f(z))],
colorspace = "RGB"]);

Why????

Oh! I've just found mistake. I use to evaluate maximum value from input matrix and simultaneously use b(t) as a function of blue color.

Spectrogram_zcoloring_correct.mw

Hello everyone again!

I realized all of my mistakes in previos algorithm, and wrote correct version of all metioned above functions using Welch algorithm: Power Spectral Density Estimation, Cross Power Spectral Density Estimation, Coherence between two signals.

I offer for your attention program, which you can find all these functions as procedures.

I attached program which results obtained with my Maple programm and Matlab built-in functions (pwelch, cpsd, mscohere) are compared. So, 5 attached files: Maple_programm, input signals for Matlab and Maple, power spectral density from matlab for signal1, cross power spectral density from matlab, coherence from matlab.

Spectral_density-maple_VS_matlab.mw

cpsd_test_mbin.txt

psd_test_mbout.txt

cpsd_test_mbout.txt

coh_test_mbout.txt

@mmcdara 

Thank you for your answer. I realized my mistake. So, if i want to compute cross power spectral density i have to write "CrossCorrelation" path of algorithm on my own.


If you are interested in full algorithm for Cross Power Spectral Density and Coherence you can see my answer above.

@Samir Khan 

Yes, it is.

I have one request. Please add сontinuous wavelet transform (CWT) as an alternative to Short-time Fourier transform in Spectrogram command from SignalProcessing

@acer Thanak you for your answer.

But this approach doesn't work, because execution continues. I want to stop execution before "a:=1;". Moreover if I use done/quit/stop I'll get error. 

Error, done/quit/stop disabled. Please use File->Close

@acer 

Thank you very much. Your answers are good food for thought.

@acer 

Thank you very much! Your advice is useful for me.

Could you give me another concil — about colors in listcontplot. Is it possible to choose colors in this command?

@acer Thank you for your answer.

@Kitonum 

What about scale? If I want plot something like that: "plot [sin(x)/10^5, cos(x)+2.4, 1.2]". It seems your solution is not appropriate in this case.

@Axel Vogt 

I didn't catch your idea. Could you give simple example, please?

If it is interesting I add my experimental data. First column is time, second and third are signal1 and signal2 respectively.

Plot_example.txt

 

@Christopher2222 

"What happened to your question regarding most efficient way to parse?"

> I don't know.

"Yes you can create graphs like that in Maple.  Just for fun without the scale it appears a is just smoothed b, b is some squared or doubled of c."

> Hm. I would like to visualize experimental data. So, I have got for example Matirx(n,m), where the first column is time and others are experimental signals. It would be great if I could plot experimental signals like on my "example picture".

I propose next solution:

1. Use "readbytes" to read large file

2. Construct from input matrix large string

3. Convert string to Vector[row]

4. Import data from Vector[row]

So, as I understand the main problem consist with "parse". It works very slow.

Now my quesiton is: How to parse large string fast?

Fast_read_test.mw

@tomleslie 

I'm so sorry. I have uploaded the wrong link.

This is the right one:

https://cloud.mail.ru/public/FLa3/sYP3cNkWj

1 2 Page 1 of 2