Solved

Which doors are open?

There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

5 mois ago

Solved

Pascal's Triangle

Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

5 mois ago

Solved

Find the two-word state names

Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

5 mois ago

Answered

Want to add image in report from image variable in work space

You can try mlreportgen.dom.Image class to append the image to the report. Refer to the following documentation link for detail...

Want to add image in report from image variable in work space

You can try mlreportgen.dom.Image class to append the image to the report. Refer to the following documentation link for detail...

5 mois ago | 0

Answered

Cumulative sum with multiple constraints

You can try the following code to get the cumulative sum as fourth column in table T. date = [20190101; 20190101; 20190101; 201...

Cumulative sum with multiple constraints

You can try the following code to get the cumulative sum as fourth column in table T. date = [20190101; 20190101; 20190101; 201...

5 mois ago | 0

Answered

Bar plot using multiple table variables?

Hi, You can try the following code. Assuming that the data is present in the table named "table_data". % table_data has the da...

Bar plot using multiple table variables?

Hi, You can try the following code. Assuming that the data is present in the table named "table_data". % table_data has the da...

5 mois ago | 0

Solved

Binary numbers

Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

5 mois ago

Solved

Counting Money

Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

5 mois ago

Solved

Find state names that start with the letter N

Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

5 mois ago

Solved

Find state names that end with the letter A

Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

5 mois ago

Solved

Remove all the words that end with "ain"

Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

5 mois ago

Answered

How do I plot a histogram for large data sets?

The basic difference between histogram and bar chart is: Histogram refers to a graphical representation; that displays data by ...

How do I plot a histogram for large data sets?

The basic difference between histogram and bar chart is: Histogram refers to a graphical representation; that displays data by ...

5 mois ago | 0

Answered

Error message while using if statement

Syntax of if conditional: if expression statements else statements end There should be no newline character betwee...

Error message while using if statement

Syntax of if conditional: if expression statements else statements end There should be no newline character betwee...

5 mois ago | 0

| accepted

Answered

How to use result in each iteration in a for loop and then use it in next loop?

Merge both the loops and use the generated result in the same loop. for i=1:10 x = 10*i; % This is the value generated. Ex...

How to use result in each iteration in a for loop and then use it in next loop?

Merge both the loops and use the generated result in the same loop. for i=1:10 x = 10*i; % This is the value generated. Ex...

5 mois ago | 0

Solved

Target sorting

Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

5 mois ago

Solved

Bullseye Matrix

Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

5 mois ago

Solved

The Goldbach Conjecture

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

5 mois ago

Solved

Remove all the consonants

Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

5 mois ago

Answered

How to extract some columns from txt file to cell

Assume that the above text is in 'sample.txt'. Read data from sample.txt to a table using readtable() function. Extract the r...

How to extract some columns from txt file to cell

Assume that the above text is in 'sample.txt'. Read data from sample.txt to a table using readtable() function. Extract the r...

5 mois ago | 0

Solved

Find the longest sequence of 1's in a binary sequence.

Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

5 mois ago

Solved

Nearest Numbers

Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

5 mois ago

Solved

Find the alphabetic word product

If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

5 mois ago

Solved

Which values occur exactly three times?

Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

5 mois ago

Answered

can anyone know to write a mathlab function that takes an input integer "n" and computes the following

Using While loop, try the following function: function result = getFacWhile(n) result = 1; while n ~= 1 resu...

can anyone know to write a mathlab function that takes an input integer "n" and computes the following

Using While loop, try the following function: function result = getFacWhile(n) result = 1; while n ~= 1 resu...

5 mois ago | 0

Solved

Back and Forth Rows

Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

5 mois ago

Solved

Return the largest number that is adjacent to a zero

This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

5 mois ago

Solved

Sort a list of complex numbers based on far they are from the origin.

Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

5 mois ago

Answered

how to find the equivalent value in the same row of the next column?

Use a for loop to iterate over the values in 1st column and if the required condition is satisfied, append the value in the 2nd ...

how to find the equivalent value in the same row of the next column?

Use a for loop to iterate over the values in 1st column and if the required condition is satisfied, append the value in the 2nd ...

5 mois ago | 0

Answered

Error: File: Symbolic_Relationships.m Line: 17 Column: 11 The expression to the left of the equals sign is not a valid target for an assignment.

The error is due to the square brackets that you used to denote a block for if condition. Square brackets are not required to de...

Error: File: Symbolic_Relationships.m Line: 17 Column: 11 The expression to the left of the equals sign is not a valid target for an assignment.

The error is due to the square brackets that you used to denote a block for if condition. Square brackets are not required to de...

5 mois ago | 0

| accepted