O'Reilly logo

MATLAB Graphics and Data Visualization Cookbook by Swapnonil Banerjee, Nivedita Majumdar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Visualizing details with data transformations

The right transformation can reveal features of the data that are not observable in the original domain. In this recipe, you will see this principle at work.

Getting ready

In this recipe, you will use a data series with time variant rate of growth. It is common practice to use log transformations to effectively visualize the periods of growth in such cases. The original function generates a series of over 50 cycles following the given equation, where the growth efficiency E is a function of time (execute source code lines 11 – 15).

y1 = r * (1+E).^x;

How to do it...

Perform the following steps:

  1. Plot the original and transformed data with the plotyy command:
    y2 = log(y1); axes('position',[0.1300 0.1100 0.7750 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required