Community Profile # Bernardo Cardoso de Aquino Cruz

### MathWorks

Last seen: Today Active since 2022

#### Statistics

• • • • • • • • • • • • #### Content Feed

View by

Solved

Create the Ulam spiral
Have you ever seen this wonderful spiral ? The Ulam Spiral is arranging prime numbers in a clockwise spiral starting in 0. Give...

5 meses ago

Solved

Area of a regular hexagon
Given the length of a side of a regular hexagon, return its area rounded to two decimal places.

5 meses ago

Solved

Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

5 meses ago

Solved

Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

5 meses ago

Solved

Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

5 meses ago

Solved

Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

5 meses ago

Solved

Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

5 meses ago

Solved

Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

5 meses ago

Solved

Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

5 meses ago

Solved

String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

5 meses ago

Solved

Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

5 meses ago

Solved

Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

5 meses ago

Solved

Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

5 meses ago

Solved

Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

5 meses ago

Solved

Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

5 meses ago

Solved

Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

5 meses ago

Solved

Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

5 meses ago

Solved

Converts numbers into characters
Converts numbers into characters

5 meses ago

Solved

Find the max element of the array
Find the max element of the array

5 meses ago

Solved

Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

5 meses ago

Solved

Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

5 meses ago

Solved

to the 2 all elements
to the 2 all elements

5 meses ago

Solved

the average value of the elements
Calculate the average value of the elements in the array

5 meses ago

Solved

Double all elements in the array
Duplicate all elements in the array

5 meses ago

Solved

calculate the length of matrix
input 1 array, calculate the length

5 meses ago

Solved

Draw a '0' in a one matrix!

5 meses ago

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-...

5 meses ago

Solved

Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

5 meses ago

Solved

Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

5 meses ago

Solved

Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

5 meses ago
{"ft_lang_label":"__label__en","ft_lang_prob":0.6733871,"math_prob":0.98270434,"size":4986,"snap":"2022-27-2022-33","text_gpt3_token_len":1414,"char_repetition_ratio":0.20092332,"word_repetition_ratio":0.11873639,"special_character_ratio":0.27115923,"punctuation_ratio":0.13868614,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9934129,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],"im_url_duplicate_count":[null,1,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-10T23:14:31Z\",\"WARC-Record-ID\":\"<urn:uuid:514654c5-3b29-4e62-9e4c-b7444952a124>\",\"Content-Length\":\"128979\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fae01771-ab07-4347-b5a1-331660d118ba>\",\"WARC-Concurrent-To\":\"<urn:uuid:fa3ca276-f8ae-4b9a-b51a-802b0ed508bb>\",\"WARC-IP-Address\":\"104.68.243.15\",\"WARC-Target-URI\":\"https://la.mathworks.com/matlabcentral/profile/authors/25419722\",\"WARC-Payload-Digest\":\"sha1:6EQAHM43TGT4CJHL3JKSEMYEDDIJNESX\",\"WARC-Block-Digest\":\"sha1:QMFTYLUSSL2GRDWQKCZCVXMUDZZBGGHH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882571222.74_warc_CC-MAIN-20220810222056-20220811012056-00797.warc.gz\"}"}