Community Profile

photo

Daniel Pereira


Last seen: 4 months ago
1,299 total contributions since 2013

Industrial Engineer, with more than 9 years experience in power plants modelling, and H2020 innovation projects.

Contact

Daniel Pereira's Badges

  • Scavenger Finisher
  • Thankful Level 1
  • Knowledgeable Level 1
  • First Answer
  • Cody Challenge Master
  • Matrix Manipulation I Master
  • Community Group Solver
  • Personal Best Downloads Level 3
  • First Review
  • 5-Star Galaxy Level 5
  • Cody Problems in Japanese Master
  • First Submission
  • Project Euler I
  • Cody5 Easy Master
  • Functions I Master

View all

Contributions in
View by

Solved


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

4 months ago

Solved


Convert matrix to 3D array of triangular matrices
Given a 2D numeric array x in which each column represents the vectorized form of an upper triangular matrix, return a 3D array ...

4 months ago

Solved


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

4 months ago

Solved


Tax Season ! How much is my salary?
Tax Season! I was employed for a period from x until y in a year and I get pay check of amount z on every alternate Friday of th...

4 months ago

Solved


Create a Cell array of month-end date strings within a date range
This is a variation of <http://www.mathworks.com/matlabcentral/cody/problems/1039-get-an-array-of-month-ends-in-a-date-range Get...

4 months ago

Solved


Find Month & day for given day number of a year
Find Month & day for given day number of a year (day number is any number ranging from 1 to 366)

4 months ago

Solved


Is this date a palindrome?emordnilap a etad siht sI
Take a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome. A date ...

4 months ago

Solved


Calculate days until Christmas
Provided with inputs year, month, day e.g. 2019,11,12, calculate the number of days until the next Christmas day, i.e. the next ...

4 months ago

Solved


birthday on same day of week
Say, Mr. X's birthday is on 20th July, 2014. It was Sunday. Determine the closest year when his birthday will again be on Sunday...

4 months ago

Solved


How Many Months Until It's Today Again?
Given a particular date, calculate how many months must pass before that same day of the month occurs on the same day of the wee...

4 months ago

Solved


weekday and month
Given a year and a weekday, determine how many months of that year had five of those weekdays. It is kind of easy to find. Ex...

4 months ago

Solved


microseconds passed today
Calculate the amount of microseconds passed for a given date string. Return the value, rounded to the nearest integer, as a stri...

4 months ago

Solved


calculate the day of the year from a date string.
'09-Oct-2016' is the 283rd day of the year. So doy = dayoftheyear('09-Oct-2016') should return doy = 283

4 months ago

Solved


Find my birthday
Given a birth date x, find my age when my birth day will fall on the same day as I was born. So if I was born on Monday, what a...

4 months ago

Solved


Get an array of month-ends in a date range
Create a function that would return a list of month-ends falling in a given date range. If a start date or end date falls on a...

4 months ago

Solved


Can't wait for NewYear ball drop !
Given an input string of the form 'yyyy-mm-dd' or 'yyyy-mm-dd hh:mm:ss', return a string message indicating how many days, hours...

4 months ago

Solved


What day is it?
Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

4 months ago

Solved


What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

4 months ago

Solved


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

4 months ago

Solved


文字列の最初と最後の文字だけ抜き出しましょう。
文字列の最初と最後の文字をつなげて返すような関数を作成しましょう。 もし文字が一つしかない場合、その文字は最初と最後の文字のため、関数はその文字を二回返すようにしておきましょう。 例: stringfirstandlast('borin...

4 months ago

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

4 months ago

Solved


対称で、n*2n のサイズの行列を作成しましょう
サイズが n*2n の "mirror" 行列(対称行列)を作成しましょう。 例: n=2 の場合、以下のような出力を返します。 m = [ 1 2 2 1 1 2 2 1 ] n = 3 の場合、以下のよう...

4 months ago

Solved


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

4 months ago

Solved


英語の文章内の母音を取り除くコードを書きましょう。
与えられた英語の文章内の母音を取り除きましょう。 例: 入力 s1 が 'Jack and Jill went up the hill' の場合、 出力 s2 は 'Jck nd Jll wnt p th hll' * (英語版) ...

4 months ago

Solved


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

4 months ago

Solved


テレビのサイズを求めてみよう
あなたは電気屋で働いています。 あなたの電気屋にテレビを買いに来たお客さんに「何インチのテレビを買いたいのか」と質問したところ、対角線の情報しかわからないと言われてしまいました。 しかし、テレビのインチを知るには、幅と高さの情報が必要です。 ...

4 months ago

Solved


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

4 months ago

Solved


NaN (欠損値) が含まれている行を削除しよう
行列 A が与えられたとき、その行列の中に NaN (Not a number; 欠損値) の要素がある行を見つけ出し、その行を削除しましょう。 例: A = [ 1 5 8 -3 NaN 14 ...

4 months ago

Solved


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

4 months ago

Solved


特定の値がベクトル内に含まれているかを確認するコードを書こう
ベクトル b にあるスカラ値 a が含まれていれば出力として 1 を返し、含まれていなければ 0 を返すような関数を作成しましょう。 例: a = 3; b = [1,2,4]; スカラ値 3 はベクトル b に含まれていない...

4 months ago

Load more