New wave does have the same number of data point

Hi,

I got a new wave (wave2) which is created by wave0*0.1, it however doesn't have the same number of data point as wave0.

Anyone knows why?

The file is attached.

cheers
Experiment_5.pxp
Igor_user wrote:
Hi,

I got a new wave (wave2) which is created by wave0*0.1, it however doesn't have the same number of data point as wave0.

Anyone knows why?

The file is attached.

cheers



When you made your initial waves you specified the number of data points as 212
Make/N=(212) wave3=0.0001

When you made wave2 use used the command
make wave2

This causes the default value of n=128 to be used.

My work habit is often to duplicate the wave in the wave browser and then rename as needed. This also copies the wave scaling which is often what I want and saves ne a step to explicitly set it.

Andy
hegedus wrote:


When you made your initial waves you specified the number of data points as 212
Make/N=(212) wave3=0.0001

When you made wave2 use used the command
make wave2

This causes the default value of n=128 to be used.

My work habit is often to duplicate the wave in the wave browser and then rename as needed. This also copies the wave scaling which is often what I want and saves ne a step to explicitly set it.

Andy


I thought the command wave2=wave0*0.1 would create as many data point as wave0, didn't know it has a default number of data point 128 for every 'make wave' command used.
Igor_user wrote:
I thought the command wave2=wave0*0.1 would create as many data point as wave0, didn't know it has a default number of data point 128 for every 'make wave' command used.


Go to the menu Help > Command Help. Go to the tab Command Help. Search for the Make command. Read the information. The end tells you the defaults.

Do the same for the Duplicate.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
You made an assumption. Wave arithmetic is much more powerful and complicated than you suspect. Copy this command, paste it into Igor's command line and press Enter:

DisplayHelpTopic "Waveform Arithmetic and Assignment"

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Igor_user wrote:


I thought the command wave2=wave0*0.1 would create as many data point as wave0, didn't know it has a default number of data point 128 for every 'make wave' command used.


the command wave2=wave0*0.1 does NOT create wave2. Wave2 must already exist. Additionally, wave arithmetic operations do not change the number of data points within a wave.

You would either have to use make/n=(number of points) as mentioned by others, ensuring that the number of points is the same. OR you can use the Duplicate function. this will create a new wave with the same number of datapoints as the one you duplicate.