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 months 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 months 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 months ago

Solved

Find the maximum number of decimal places in a set of numbers

Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

5 months ago

Solved

Find the Oldest Person in a Room

Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

5 months ago

Solved

Draw 'E'

Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

5 months ago

Solved

~~~~~~~ WAVE ~~~~~~~~~

|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

5 months ago

Solved

Fix the last element of a cell array

Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

11 months ago

Solved

Remove element(s) from cell array

You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

12 months ago

Solved

Calculate Alcohol By Volume with Original and Final Gravity

Given an initial gravity of un-fermented wort (OG) and a final gravity of fermented wort (FG), better known as beer, it is possi...

1 year ago

Solved

Average Grade

Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

1 year ago

Solved

Convert decimal to hex as shown in test cases

Convert decimal to hex as shown in test cases.

1 year ago

Solved

generate the matrix

given a value n (say 4) - generate the matrix like below y= [0 1 2 3 4; -1 0 1 2 ...

1 year ago

Solved

Area-03

There are two circles of equal size are inscribed inside a square. They are tangent to each other. <https://serving.photos.ph...

1 year ago

Solved

Area-01

Given the radius of the circle inscribed in a square, find the area that is not bounded by the circle but inside the square. ...

1 year ago

Solved

Calculate Amount of Cake Frosting

Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

1 year ago

Solved

Outlier number!

Find a number which has maximum distance from the mean value of vector A. Example: A=[5 2 1 5 6 2 5 9] y=9

1 year ago

Solved

Draw 'H'

Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

1 year ago

Solved

Draw a 'N'!

Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

1 year ago

Solved

Alternate list of elements

Write a function that combines two lists by alternating the elements, e.g. ['a','b','c'], ['1','2','3'] → 'a1b2c3'.

1 year ago

Question

functions to import czi files

Are there any functions to import czi files, which is Carl Zeiss Image files? I don't have any Zeiss equipment or softwear, "Ze...

1 year ago | 0 answers | 2

Question

保存ファイル名に「実行したmファイル名」を自動で含めることはできますか？

例えば testfile.mの実行結果を「testfile_out.mat」という名前で保存したいです。 下に直したいコードをつけました。 ここでは手動で 'testfile' と書いてしまっていますが、 自動でこのmファイル名 'testfile'...

1 year ago | 1 answer | 0

Solved

Given a number N, find the smallest prime P>N

Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

2 years ago

Solved

Draw 'C'.

Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

2 years ago

Solved

Draw a 'X'!

Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

2 years ago

Solved

COUNT VOWEL

Count, how many times vowels occurred. EXAMPLE: x='string the MaTLaBiAn' then the answer will be 6. x='coUnt the vowEl' th...

2 years ago

Solved

Add one raw in given matrix as shown in example

*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

2 years ago

Solved

Find out magnitude of vector

Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

2 years ago

Solved

Create a Standard Size Vector

Given an input x, create a row vector y from 1 to x with 5 elements.

2 years ago