Convert y-axis from feet to meters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Convert y-axis from feet to meters

miroslav
Hello,

so I have my y-axis in feet and I want meters instead. Is there any way to
do it without changing actual equations?

Thank you,
MK



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Convert y-axis from feet to meters

Gordon Haverland
On Fri, 29 Dec 2017 10:33:29 -0700 (MST)
miroslav <[hidden email]> wrote:

> Hello,
>
> so I have my y-axis in feet and I want meters instead. Is there any
> way to do it without changing actual equations?

Greetings from the beginning of the Alaska Highway (and a chilly -33C
outside).

A program that has been around UN*X for ages, is 'units'.  It has many
conversion factors in it, and there are even ways to coax things like
temperature and temperature difference into these conversions.

Looking in a search engine, I see that octave has a way to access the
Gnu units program and data.

That would seem to be the most robust method to me.

There are some measurements that I think units won't work with.  The
one that comes to mind is a fracture toughness measurement which
involves square root meters.

It may be that the help within octave for this octave-forge package is
sufficient for you to figure things out.  If not, someone will probably
write better instructions than I can.

Gord


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Convert y-axis from feet to meters

Juan Pablo Carbajal-2
In reply to this post by miroslav
Dear MK,

The axes know nothing about the units you are using. You can just
change the y tick labels to the values in meters

Example:
assume you have a ROW vector "y_meters" with the values in meters

ytxt = strsplit (num2str (y_meters));
set (gca, 'yticklabel', ytxt);

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Convert y-axis from feet to meters

Francesco Potortì
In reply to this post by miroslav
>so I have my y-axis in feet and I want meters instead. Is there any way to
>do it without changing actual equations?

Can you give an example of what you want and what you do not want?

--
Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Convert y-axis from feet to meters

miroslav
This post was updated on .
As you can see in the images, the problem is that the equation plots in ft
and °F. I changed °F to °C by simple conversion of the equation, but I can't
do it with ft. Thats why I'm trying to change it directly in the plot. By the way "z" is vector of depth there, z=(0:Lmax) and changing that to meters doesn't work.

<http://octave.1599824.n4.nabble.com/file/t372620/2.png
<http://octave.1599824.n4.nabble.com/file/t372620/1.png



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
Help-octave@gnu.org
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Convert y-axis from feet to meters

Maynard Wright
On Saturday, December 30, 2017 11:42:43 AM miroslav wrote:
> As you can see in the images, the problem is that the equation plots in ft
> and °F. I changed °F to °C by simple conversion of the equation, but I can't
> do it with ft. Thats why I'm trying to change it directly in the plot.
>
> <http://octave.1599824.n4.nabble.com/file/t372620/2.png>
> <http://octave.1599824.n4.nabble.com/file/t372620/1.png>
>
>

If I understand correctly what you are doing, how about defining a new vector
with 5000 elements in which each element represents a conversion from feet to
meters:

ft = [0: 1: 5000];
mtrs = 0.3048 .* ft;

Then plot using two vectors rather than one, T1 and T2 on the x axis and mtrs
on the y axis.

Regards,

Maynard Wright



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave