Solved

Pattern matching

Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

2 years ago

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

2 years ago

Answered

computing the average of all each month from all data in time series

Hey, I understand that you want the average of each column (representing months). You can use mean() to do that. For examp...

computing the average of all each month from all data in time series

Hey, I understand that you want the average of each column (representing months). You can use mean() to do that. For examp...

2 years ago | 0

| accepted

Answered

concatenate cell array of cell arrays

I'm assuming you want to retain the data of one cell array as a column. A work around could be the following * Find the ...

concatenate cell array of cell arrays

I'm assuming you want to retain the data of one cell array as a column. A work around could be the following * Find the ...

2 years ago | 0

Answered

create a picture with matrix

Here's what I understand from your question, you have a matrix of 0s and 1s and want to generate a binary (black and white) imag...

create a picture with matrix

Here's what I understand from your question, you have a matrix of 0s and 1s and want to generate a binary (black and white) imag...

2 years ago | 1

Answered

[matlab] Morse code decoder, please help me

The problem with your solution is, you are comparing '.- -...' to '.-'. First break the input string to individual morse let...

[matlab] Morse code decoder, please help me

The problem with your solution is, you are comparing '.- -...' to '.-'. First break the input string to individual morse let...

2 years ago | 1

Solved

Nearest Numbers

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

2 years ago

Answered

How can I save 3 matrices created by for loop to save in a single matrix?

Since you know the size of the final matrix, first you can initialize the matrix of that size and then assign the appropriate ro...

How can I save 3 matrices created by for loop to save in a single matrix?

Since you know the size of the final matrix, first you can initialize the matrix of that size and then assign the appropriate ro...

2 years ago | 0

| accepted

Answered

How to highlight the vertex (vertices) of a voronoi diagram?

you can use scatter to plot/highlight the vertices of the Voronoi diagram by adding the lines of code below at the end of your c...

How to highlight the vertex (vertices) of a voronoi diagram?

you can use scatter to plot/highlight the vertices of the Voronoi diagram by adding the lines of code below at the end of your c...

2 years ago | 0

| accepted

Answered

[Solving System of Linear Equations] What is the norm of the error and how is it different from the norm of the residual?

Error refers to the difference between the observed value and the actual values while residual is the disagreement between the o...

[Solving System of Linear Equations] What is the norm of the error and how is it different from the norm of the residual?

Error refers to the difference between the observed value and the actual values while residual is the disagreement between the o...

2 years ago | 0

Answered

Matlab taking too much time to give output

For the convergence problem, the upper bound could be used on the number of iterations, as suggested by Aakash. As for the probl...

Matlab taking too much time to give output

For the convergence problem, the upper bound could be used on the number of iterations, as suggested by Aakash. As for the probl...

2 years ago | 0

Solved

The Goldbach Conjecture

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

2 years ago

Solved

Fibonacci sequence

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

2 years ago

Answered

when using Design Error Detection and generate test, Simulink Design Verifier has exceeded the maximum processing time

One of the reasons for this could be that the 'maximum analysis time' in configuration parameter box is very small. You can i...

when using Design Error Detection and generate test, Simulink Design Verifier has exceeded the maximum processing time

One of the reasons for this could be that the 'maximum analysis time' in configuration parameter box is very small. You can i...

2 years ago | 0

Answered

Help With Starting Code

What i get from your question, you want a code that gives you the pairs of h and volume for all r and h.The code below creates a...

Help With Starting Code

What i get from your question, you want a code that gives you the pairs of h and volume for all r and h.The code below creates a...

2 years ago | 0

Answered

how to get combination

Here's what I understand from your question, you want all divisors of a number. You can use in-built 'divisors()' function. ...

how to get combination

Here's what I understand from your question, you want all divisors of a number. You can use in-built 'divisors()' function. ...

2 years ago | 0

| accepted

Answered

3d Bar plot on map

You can plot image as a surface (on x-y plane) using the following code %Insert Image Z=imread('img.jpg'); [X,...

3d Bar plot on map

You can plot image as a surface (on x-y plane) using the following code %Insert Image Z=imread('img.jpg'); [X,...

2 years ago | 1

| accepted

Answered

Code printing double line

What is happening is that you are actually printing the whole vector instead of the latest 'perfect Number'. Make your print ...

Code printing double line

What is happening is that you are actually printing the whole vector instead of the latest 'perfect Number'. Make your print ...

2 years ago | 0

| accepted

Answered

Import multiple excel sheets with multiple columns each into variables

You can use xlsread(xls_file,sheet_no) to read from particular sheet, refer <https://www.mathworks.com/help/matlab/ref/xlsread...

Import multiple excel sheets with multiple columns each into variables

You can use xlsread(xls_file,sheet_no) to read from particular sheet, refer <https://www.mathworks.com/help/matlab/ref/xlsread...

2 years ago | 1

| accepted

Answered

How to make normalised frequency distribution plot?

Here's what I understand from your question, you want to normalize A and after normalization the NaNs gets replaced by a number....

How to make normalised frequency distribution plot?

Here's what I understand from your question, you want to normalize A and after normalization the NaNs gets replaced by a number....

2 years ago | 0

Answered

Power of sine wave plot

Here's what I understand from your question, you want to know how to calculate 'Power' of sine wave and plot it over Power Spect...

Power of sine wave plot

Here's what I understand from your question, you want to know how to calculate 'Power' of sine wave and plot it over Power Spect...

2 years ago | 0

| accepted

Answered

How to use input signals as variables in Simulink blocks?

oh, you want use input signals as values for parameter? I'm afraid that's not possible. Signals and parameters are two different...

How to use input signals as variables in Simulink blocks?

oh, you want use input signals as values for parameter? I'm afraid that's not possible. Signals and parameters are two different...

2 years ago | 1

Answered

if problem done based on the journal paper but not get results correctly, how to predict whether going path is correct r not?

There can be a lot of reasons that can cause the results to deviate from the journal. To name the few:- * Missed minute detai...

if problem done based on the journal paper but not get results correctly, how to predict whether going path is correct r not?

There can be a lot of reasons that can cause the results to deviate from the journal. To name the few:- * Missed minute detai...

2 years ago | 0

Answered

Array of Structures pre-allocation - code analyzer - appears to change size every loop iteration

The reason behind is that you cleared the array x before running the second loop and the pre-allocation before second loop only ...

Array of Structures pre-allocation - code analyzer - appears to change size every loop iteration

The reason behind is that you cleared the array x before running the second loop and the pre-allocation before second loop only ...

2 years ago | 0

Answered

How to use input signals as variables in Simulink blocks?

Here's what I understand from you question, you want to use variables as input/parameters not constants. So the way you can d...

How to use input signals as variables in Simulink blocks?

Here's what I understand from you question, you want to use variables as input/parameters not constants. So the way you can d...

2 years ago | 1

Solved

Making change

Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

2 years ago

Solved

Make a Palindrome Number

Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

2 years ago

Solved

Replace NaNs with the number that appears to its left in the row.

Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

2 years ago

Solved

Cell joiner

You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

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

2 years ago