For loop printed only last value.

9 views (last 30 days)
shivani badodiya
shivani badodiya on 25 Jul 2018
Commented: shivani badodiya on 25 Jul 2018
I want to display whole years 2011 to 2017 but i am getting only 2017.I attached my code snippet please correct my mistake.
  4 Comments
KALYAN ACHARJYA
KALYAN ACHARJYA on 25 Jul 2018
More clarification needed, what you exactly looking for. You have said, getting 2017 only, but when I run the code, it shows 2016 also?
shivani badodiya
shivani badodiya on 25 Jul 2018
yes but i want 2011 to 2017 all 7 years,by your solution it is showing 2016 and 2017 only, i need all.

Sign in to comment.

Answers (1)

shivani badodiya
shivani badodiya on 25 Jul 2018
I attached data with 3 column i have more columns in this sheet but i want to extract year 2011 to 2017 and for each year i want month 11 12 1 2 3 4 only.
  2 Comments
shivani badodiya
shivani badodiya on 25 Jul 2018
Edited: shivani badodiya on 25 Jul 2018
it shows 2017 and 2016 result only and for 2016 it is showing month 11 and 12 only.i want to print all years 2011 to 2017

Sign in to comment.

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!