Solved


nxn matrix with elements from 1:n^2
really simple once you see what the matrix is supposed to look like. i appreciate what seems to be a clever approach to solving ...

2 years ago

Solved


Construct numbers from antidiagonals of stacks of binary numbers
A sequence is constructed in the following way: Express the numbers 1, 2, 3, 4, 5,… in binary and stack them, right-justified. T...

2 years ago

Solved


ベクトルを作成する
0 から n までのベクトルを 2 間隔で作成します。

2 years ago

Solved


List lunar triangular numbers without duplication
Triangular numbers—which are the subject of Cody Problems 5, 291, 44289, 44732, 45833, 55680, 55695, and 55705—are the sums of c...

2 years ago

Solved


RPN Calculator for simple arithmetic expressions
Reverse-Polish-Notation (RPN) is a machine friendly form of calculating expressions. Example, to evaluate, (1+2)*4 + 5 - 3 you e...

2 years ago

Solved


Snakes and Ladders: Variable Die
This problem is a sequal to Problem 59132 Snakes and Ladders: Average Number of Turns. Instead of a 6-sided die, your function ...

2 years ago

Solved


Snakes and Ladders: Average Number of Turns
In this problem, you will play a single-player variant of the classic game Snakes and Ladders. The rules are as follows: The pl...

2 years ago

Solved


Bullseye Matrix with Zeros
Inspired by Problem 18, create a bullseye matrix with the addition of padding equal to 0 between concentric rings. Matrices are ...

2 years ago

Solved


Determine if a number is a cool number
A number is considered cool if it is 3 digits, has a 5 in it, and is divisible by 4.

2 years ago

Solved


Palindrome String
Determine if the inputted string is a palindrome. That is, the string is the same forwards as it is backwards. For example: ...

2 years ago

Solved


Palindrome vector
Check if a given vector is Palindrome. Example, [1 2 54 32 45 5 33 456 45 456 33 5 45 32 54 2 1]

2 years ago

Solved


Sum of squares
Given a number n, return the sum of squares of all integers from 1 to n.

2 years ago

Solved


Determine whether a number is a Zeisel number
Do you know what is interesting about the number 1729? That’s right: it’s the third Zeisel number, a number given by , where ...

2 years ago

Solved


rotation et mise à l'échelle avec des complexes
Ecrire une fonction Zr=scale_rot(A,phi,Z) qui permet une mise à l'échelle d'un facteur A et une rotation d'un angle phi (en rad)...

2 years ago

Solved


Find stiffness of all beams for single floor in building
Create a function that finds this stiffness k of all the beams (also known as 'stanchions') for one floor of a three storey buil...

2 years ago

Solved


Find mass of single floor in building
A model building has three floors are highlighted in different colours here: Assu...

2 years ago

Solved


Count integers in randomized vector that are multiples of a given number.
The mod() function We might all remember the days when we were taught to divide and then set the remainder aside if the numbers...

2 years ago

Solved


The Hacker Parole Problem
The hacker parole problem 100 hackers have been imprisoned, but have been given a way to get parole. Each of the 100 prisone...

2 years ago

Solved


Lancer de dés
Ecrire une fonction qui imite le lancer d'un dé, i-e qui renvoie de façon aléatoire un entier entre 1 et 6. Attention cette fon...

2 years ago

Solved


Solve an ODE: precocious pair’s porcine pursuit
In our previous encounters with Matilda and Labrun, the scintillating siblings collected candy wrappers, amused others with card...

2 years ago

Solved


Solve an ODE: first-order linear equation
In the fall semester of [redacted], my professor for a course on ordinary differential equations said, “There are two groups of ...

2 years ago

Solved


Evaluate the Struve function
The <https://en.wikipedia.org/wiki/Struve_function Struve function> *H*_a(x) is a solution to an inhomogeneous form of Bessel's ...

2 years ago

Solved


Sum the prime numbers from 1-100
Write a function to sum up the prime numbers from 1-100.

2 years ago

Solved


Repopulate the City
For any population p of positive integers between pmin and pmax, we can calculate histogram count n for a list of evenly dividin...

2 years ago

Answered
nested loop shows only the result of last iteration
Index W_T T=10 W_T=zeros(T,T-1); for n=0:T-1 W_t=(1+r*(1-tau)).^(-(T-n)).*C_0*epsilon.^T.*K^(1/gamma); for m=n+1...

2 years ago | 1

Solved


Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

2 years ago

Solved


Solve an ODE: nonlinear third-order equation
Write a function to solve the ordinary differential equation on the domain with , , and either or . The input variable ord ...

2 years ago

Solved


8 : Find the Solving vector
The Puzzle 8 is a variant of 15 ( Fifteen ). Fifteen is a slider puzzle, also a matlab function, with the goal being to create t...

2 years ago

Load more