Turn the following values into percentage
Multi tool use
I have the following data:
{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}
{5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}
My data is already in Matrix form in Mathematica, is there a possibility to change the second raw into percentages? I want the first data: 5914 to be 100% and calculate how much did the data grow over the years based on the first year. So the last number should be: 324%.
How could this be done automatically and for a huge set of data?
Thank you!
list-manipulation numerics data
New contributor
add a comment |
I have the following data:
{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}
{5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}
My data is already in Matrix form in Mathematica, is there a possibility to change the second raw into percentages? I want the first data: 5914 to be 100% and calculate how much did the data grow over the years based on the first year. So the last number should be: 324%.
How could this be done automatically and for a huge set of data?
Thank you!
list-manipulation numerics data
New contributor
try thisdata = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}; secondData = data[[2]]; secondData = IntegerPart[N[#*100/First[secondData]]]& /@ secondData; data[[2]] = secondData;
– Xminer
3 hours ago
Just divide your array with the first element?arr/First[arr]
. You might want to go through some basic tutorials: wolfram.com/language/elementary-introduction/2nd-ed
– Szabolcs
3 hours ago
add a comment |
I have the following data:
{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}
{5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}
My data is already in Matrix form in Mathematica, is there a possibility to change the second raw into percentages? I want the first data: 5914 to be 100% and calculate how much did the data grow over the years based on the first year. So the last number should be: 324%.
How could this be done automatically and for a huge set of data?
Thank you!
list-manipulation numerics data
New contributor
I have the following data:
{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}
{5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}
My data is already in Matrix form in Mathematica, is there a possibility to change the second raw into percentages? I want the first data: 5914 to be 100% and calculate how much did the data grow over the years based on the first year. So the last number should be: 324%.
How could this be done automatically and for a huge set of data?
Thank you!
list-manipulation numerics data
list-manipulation numerics data
New contributor
New contributor
edited 3 hours ago
Szabolcs
158k13432926
158k13432926
New contributor
asked 3 hours ago
user62202
111
111
New contributor
New contributor
try thisdata = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}; secondData = data[[2]]; secondData = IntegerPart[N[#*100/First[secondData]]]& /@ secondData; data[[2]] = secondData;
– Xminer
3 hours ago
Just divide your array with the first element?arr/First[arr]
. You might want to go through some basic tutorials: wolfram.com/language/elementary-introduction/2nd-ed
– Szabolcs
3 hours ago
add a comment |
try thisdata = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}; secondData = data[[2]]; secondData = IntegerPart[N[#*100/First[secondData]]]& /@ secondData; data[[2]] = secondData;
– Xminer
3 hours ago
Just divide your array with the first element?arr/First[arr]
. You might want to go through some basic tutorials: wolfram.com/language/elementary-introduction/2nd-ed
– Szabolcs
3 hours ago
try this
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}; secondData = data[[2]]; secondData = IntegerPart[N[#*100/First[secondData]]]& /@ secondData; data[[2]] = secondData;
– Xminer
3 hours ago
try this
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}; secondData = data[[2]]; secondData = IntegerPart[N[#*100/First[secondData]]]& /@ secondData; data[[2]] = secondData;
– Xminer
3 hours ago
Just divide your array with the first element?
arr/First[arr]
. You might want to go through some basic tutorials: wolfram.com/language/elementary-introduction/2nd-ed– Szabolcs
3 hours ago
Just divide your array with the first element?
arr/First[arr]
. You might want to go through some basic tutorials: wolfram.com/language/elementary-introduction/2nd-ed– Szabolcs
3 hours ago
add a comment |
3 Answers
3
active
oldest
votes
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143,6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}
There's no need to define additional variables,try
data[[2]] = 100 data[[2]]/data[[2, 1]]//Round[#,1]& (*//IntegerPart*) ;
data
(*{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100,103, 104, 304, 307, 310, 312, 312, 317, 324}}*)
In many applications,Round
would be more appropriate thanIntegerPart
– Bob Hanlon
3 hours ago
@ Bob Hanlon Thanks, you're right (but it is a liitle bit slower ;-) )
– Ulrich Neumann
3 hours ago
@Ulrich If it is about speed, I'd preferdata[[2]] = Round[data[[2]] (100. /data[[2, 1]]), 1]
. The converts to machine precision numbers and reduces the number of scalar-vector multiplications from 2 to 1.
– Henrik Schumacher
2 hours ago
@ Henrik Thanks, my actual answer seems to be the power-version!
– Ulrich Neumann
1 hour ago
add a comment |
(I get to show this first...)
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}};
{data[[1]], PercentForm[N[data[[2]]]/data[[2, 1]]]}
(...coming soon, in version 12)
If I doNumberForm[100.,{4,1}]
I get100.0
. And forNumberForm[312.,{4,1}]
312.0
. It looks like thatPercentForm[1.]
gives100%
andPercentForm[3.12]
results in312.%
. Is this just the usual sloppiness or will this be fixed ? Also, why do you have to useN
? Shouldn't this be done automatically, at least if the default ofPercentForm
seems to be to print 1 digit to the right of the decimal point?
– Rolf Mertig
50 mins ago
@RolfMertig The decimal point disparity was a design choice (at the insistence of the boss), to only put in a decimal when the value does not coerce to an integer. As for usingN
, we opted not to coerce exact values, other than integers, into percentages. So that was also a design choice.
– Daniel Lichtblau
31 mins ago
add a comment |
Similar to the above:
k = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017} , {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}}
k[[2]]=Flatten[Floor[100*Rest[k]/Flatten[Rest[k]][[1]]]]
Gives
{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100, 103, 104, 304, 307, 310, 312, 312, 317, 324}}
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
user62202 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f188823%2fturn-the-following-values-into-percentage%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143,6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}
There's no need to define additional variables,try
data[[2]] = 100 data[[2]]/data[[2, 1]]//Round[#,1]& (*//IntegerPart*) ;
data
(*{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100,103, 104, 304, 307, 310, 312, 312, 317, 324}}*)
In many applications,Round
would be more appropriate thanIntegerPart
– Bob Hanlon
3 hours ago
@ Bob Hanlon Thanks, you're right (but it is a liitle bit slower ;-) )
– Ulrich Neumann
3 hours ago
@Ulrich If it is about speed, I'd preferdata[[2]] = Round[data[[2]] (100. /data[[2, 1]]), 1]
. The converts to machine precision numbers and reduces the number of scalar-vector multiplications from 2 to 1.
– Henrik Schumacher
2 hours ago
@ Henrik Thanks, my actual answer seems to be the power-version!
– Ulrich Neumann
1 hour ago
add a comment |
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143,6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}
There's no need to define additional variables,try
data[[2]] = 100 data[[2]]/data[[2, 1]]//Round[#,1]& (*//IntegerPart*) ;
data
(*{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100,103, 104, 304, 307, 310, 312, 312, 317, 324}}*)
In many applications,Round
would be more appropriate thanIntegerPart
– Bob Hanlon
3 hours ago
@ Bob Hanlon Thanks, you're right (but it is a liitle bit slower ;-) )
– Ulrich Neumann
3 hours ago
@Ulrich If it is about speed, I'd preferdata[[2]] = Round[data[[2]] (100. /data[[2, 1]]), 1]
. The converts to machine precision numbers and reduces the number of scalar-vector multiplications from 2 to 1.
– Henrik Schumacher
2 hours ago
@ Henrik Thanks, my actual answer seems to be the power-version!
– Ulrich Neumann
1 hour ago
add a comment |
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143,6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}
There's no need to define additional variables,try
data[[2]] = 100 data[[2]]/data[[2, 1]]//Round[#,1]& (*//IntegerPart*) ;
data
(*{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100,103, 104, 304, 307, 310, 312, 312, 317, 324}}*)
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143,6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}
There's no need to define additional variables,try
data[[2]] = 100 data[[2]]/data[[2, 1]]//Round[#,1]& (*//IntegerPart*) ;
data
(*{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100,103, 104, 304, 307, 310, 312, 312, 317, 324}}*)
edited 3 hours ago
answered 3 hours ago
Ulrich Neumann
7,580516
7,580516
In many applications,Round
would be more appropriate thanIntegerPart
– Bob Hanlon
3 hours ago
@ Bob Hanlon Thanks, you're right (but it is a liitle bit slower ;-) )
– Ulrich Neumann
3 hours ago
@Ulrich If it is about speed, I'd preferdata[[2]] = Round[data[[2]] (100. /data[[2, 1]]), 1]
. The converts to machine precision numbers and reduces the number of scalar-vector multiplications from 2 to 1.
– Henrik Schumacher
2 hours ago
@ Henrik Thanks, my actual answer seems to be the power-version!
– Ulrich Neumann
1 hour ago
add a comment |
In many applications,Round
would be more appropriate thanIntegerPart
– Bob Hanlon
3 hours ago
@ Bob Hanlon Thanks, you're right (but it is a liitle bit slower ;-) )
– Ulrich Neumann
3 hours ago
@Ulrich If it is about speed, I'd preferdata[[2]] = Round[data[[2]] (100. /data[[2, 1]]), 1]
. The converts to machine precision numbers and reduces the number of scalar-vector multiplications from 2 to 1.
– Henrik Schumacher
2 hours ago
@ Henrik Thanks, my actual answer seems to be the power-version!
– Ulrich Neumann
1 hour ago
In many applications,
Round
would be more appropriate than IntegerPart
– Bob Hanlon
3 hours ago
In many applications,
Round
would be more appropriate than IntegerPart
– Bob Hanlon
3 hours ago
@ Bob Hanlon Thanks, you're right (but it is a liitle bit slower ;-) )
– Ulrich Neumann
3 hours ago
@ Bob Hanlon Thanks, you're right (but it is a liitle bit slower ;-) )
– Ulrich Neumann
3 hours ago
@Ulrich If it is about speed, I'd prefer
data[[2]] = Round[data[[2]] (100. /data[[2, 1]]), 1]
. The converts to machine precision numbers and reduces the number of scalar-vector multiplications from 2 to 1.– Henrik Schumacher
2 hours ago
@Ulrich If it is about speed, I'd prefer
data[[2]] = Round[data[[2]] (100. /data[[2, 1]]), 1]
. The converts to machine precision numbers and reduces the number of scalar-vector multiplications from 2 to 1.– Henrik Schumacher
2 hours ago
@ Henrik Thanks, my actual answer seems to be the power-version!
– Ulrich Neumann
1 hour ago
@ Henrik Thanks, my actual answer seems to be the power-version!
– Ulrich Neumann
1 hour ago
add a comment |
(I get to show this first...)
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}};
{data[[1]], PercentForm[N[data[[2]]]/data[[2, 1]]]}
(...coming soon, in version 12)
If I doNumberForm[100.,{4,1}]
I get100.0
. And forNumberForm[312.,{4,1}]
312.0
. It looks like thatPercentForm[1.]
gives100%
andPercentForm[3.12]
results in312.%
. Is this just the usual sloppiness or will this be fixed ? Also, why do you have to useN
? Shouldn't this be done automatically, at least if the default ofPercentForm
seems to be to print 1 digit to the right of the decimal point?
– Rolf Mertig
50 mins ago
@RolfMertig The decimal point disparity was a design choice (at the insistence of the boss), to only put in a decimal when the value does not coerce to an integer. As for usingN
, we opted not to coerce exact values, other than integers, into percentages. So that was also a design choice.
– Daniel Lichtblau
31 mins ago
add a comment |
(I get to show this first...)
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}};
{data[[1]], PercentForm[N[data[[2]]]/data[[2, 1]]]}
(...coming soon, in version 12)
If I doNumberForm[100.,{4,1}]
I get100.0
. And forNumberForm[312.,{4,1}]
312.0
. It looks like thatPercentForm[1.]
gives100%
andPercentForm[3.12]
results in312.%
. Is this just the usual sloppiness or will this be fixed ? Also, why do you have to useN
? Shouldn't this be done automatically, at least if the default ofPercentForm
seems to be to print 1 digit to the right of the decimal point?
– Rolf Mertig
50 mins ago
@RolfMertig The decimal point disparity was a design choice (at the insistence of the boss), to only put in a decimal when the value does not coerce to an integer. As for usingN
, we opted not to coerce exact values, other than integers, into percentages. So that was also a design choice.
– Daniel Lichtblau
31 mins ago
add a comment |
(I get to show this first...)
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}};
{data[[1]], PercentForm[N[data[[2]]]/data[[2, 1]]]}
(...coming soon, in version 12)
(I get to show this first...)
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}};
{data[[1]], PercentForm[N[data[[2]]]/data[[2, 1]]]}
(...coming soon, in version 12)
answered 1 hour ago
Daniel Lichtblau
46.5k275162
46.5k275162
If I doNumberForm[100.,{4,1}]
I get100.0
. And forNumberForm[312.,{4,1}]
312.0
. It looks like thatPercentForm[1.]
gives100%
andPercentForm[3.12]
results in312.%
. Is this just the usual sloppiness or will this be fixed ? Also, why do you have to useN
? Shouldn't this be done automatically, at least if the default ofPercentForm
seems to be to print 1 digit to the right of the decimal point?
– Rolf Mertig
50 mins ago
@RolfMertig The decimal point disparity was a design choice (at the insistence of the boss), to only put in a decimal when the value does not coerce to an integer. As for usingN
, we opted not to coerce exact values, other than integers, into percentages. So that was also a design choice.
– Daniel Lichtblau
31 mins ago
add a comment |
If I doNumberForm[100.,{4,1}]
I get100.0
. And forNumberForm[312.,{4,1}]
312.0
. It looks like thatPercentForm[1.]
gives100%
andPercentForm[3.12]
results in312.%
. Is this just the usual sloppiness or will this be fixed ? Also, why do you have to useN
? Shouldn't this be done automatically, at least if the default ofPercentForm
seems to be to print 1 digit to the right of the decimal point?
– Rolf Mertig
50 mins ago
@RolfMertig The decimal point disparity was a design choice (at the insistence of the boss), to only put in a decimal when the value does not coerce to an integer. As for usingN
, we opted not to coerce exact values, other than integers, into percentages. So that was also a design choice.
– Daniel Lichtblau
31 mins ago
If I do
NumberForm[100.,{4,1}]
I get 100.0
. And for NumberForm[312.,{4,1}]
312.0
. It looks like that PercentForm[1.]
gives 100%
and PercentForm[3.12]
results in 312.%
. Is this just the usual sloppiness or will this be fixed ? Also, why do you have to use N
? Shouldn't this be done automatically, at least if the default of PercentForm
seems to be to print 1 digit to the right of the decimal point?– Rolf Mertig
50 mins ago
If I do
NumberForm[100.,{4,1}]
I get 100.0
. And for NumberForm[312.,{4,1}]
312.0
. It looks like that PercentForm[1.]
gives 100%
and PercentForm[3.12]
results in 312.%
. Is this just the usual sloppiness or will this be fixed ? Also, why do you have to use N
? Shouldn't this be done automatically, at least if the default of PercentForm
seems to be to print 1 digit to the right of the decimal point?– Rolf Mertig
50 mins ago
@RolfMertig The decimal point disparity was a design choice (at the insistence of the boss), to only put in a decimal when the value does not coerce to an integer. As for using
N
, we opted not to coerce exact values, other than integers, into percentages. So that was also a design choice.– Daniel Lichtblau
31 mins ago
@RolfMertig The decimal point disparity was a design choice (at the insistence of the boss), to only put in a decimal when the value does not coerce to an integer. As for using
N
, we opted not to coerce exact values, other than integers, into percentages. So that was also a design choice.– Daniel Lichtblau
31 mins ago
add a comment |
Similar to the above:
k = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017} , {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}}
k[[2]]=Flatten[Floor[100*Rest[k]/Flatten[Rest[k]][[1]]]]
Gives
{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100, 103, 104, 304, 307, 310, 312, 312, 317, 324}}
add a comment |
Similar to the above:
k = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017} , {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}}
k[[2]]=Flatten[Floor[100*Rest[k]/Flatten[Rest[k]][[1]]]]
Gives
{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100, 103, 104, 304, 307, 310, 312, 312, 317, 324}}
add a comment |
Similar to the above:
k = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017} , {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}}
k[[2]]=Flatten[Floor[100*Rest[k]/Flatten[Rest[k]][[1]]]]
Gives
{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100, 103, 104, 304, 307, 310, 312, 312, 317, 324}}
Similar to the above:
k = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017} , {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506,
18800, 19216}}
k[[2]]=Flatten[Floor[100*Rest[k]/Flatten[Rest[k]][[1]]]]
Gives
{{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017},
{100, 103, 104, 304, 307, 310, 312, 312, 317, 324}}
answered 2 hours ago
GerardF123
1447
1447
add a comment |
add a comment |
user62202 is a new contributor. Be nice, and check out our Code of Conduct.
user62202 is a new contributor. Be nice, and check out our Code of Conduct.
user62202 is a new contributor. Be nice, and check out our Code of Conduct.
user62202 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f188823%2fturn-the-following-values-into-percentage%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
6tQX Sj X sFqOuI4Q72,MY3XzrpdNjA,Ndcc9rlz5r ITA,6Yl3ylmCJSQlAit9H
try this
data = {{2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017}, {5914, 6143, 6182, 18000, 18173, 18344, 18454, 18506, 18800, 19216}}; secondData = data[[2]]; secondData = IntegerPart[N[#*100/First[secondData]]]& /@ secondData; data[[2]] = secondData;
– Xminer
3 hours ago
Just divide your array with the first element?
arr/First[arr]
. You might want to go through some basic tutorials: wolfram.com/language/elementary-introduction/2nd-ed– Szabolcs
3 hours ago