function [ ] = leapyears(startyear,endyear) arrayYears = [startyear:endyear] checkYears = rem(arrayYears,4)
After this is run it gives me an array. I want to fprintf the inputs that give me 0. how would I go about doing that?

 채택된 답변

Guillaume
Guillaume 2018년 2월 21일

0 개 추천

fprintf('%d\n', arrayYears(checkYears == 0))

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기

질문:

2018년 2월 21일

답변:

2018년 2월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by