Answered

boxplot of matrix with different size

A = rand (9,16); B = rand (13,17); [ADim1,ADim2] = size (A); [BDim1,BDim2] = size (B); GroupingA = strcat ("A", string(r...

boxplot of matrix with different size

A = rand (9,16); B = rand (13,17); [ADim1,ADim2] = size (A); [BDim1,BDim2] = size (B); GroupingA = strcat ("A", string(r...

bijna 2 jaar ago | 0

Answered

Change colours of specific points in a scatter plot that has already been plotted?

Take a look at gscatter().

Change colours of specific points in a scatter plot that has already been plotted?

Take a look at gscatter().

bijna 2 jaar ago | 0

| accepted

Answered

boxplot of matrix with different size

You want one plot for A and one plot for B, or you want plot for every column in A and B?

boxplot of matrix with different size

You want one plot for A and one plot for B, or you want plot for every column in A and B?

bijna 2 jaar ago | 0

Answered

Multiple histograms and what will be the best way to put mean and std of data into a plot?

You can use text function to add annotations anywhere on the plots. By the way, If A, B, and C are column vectors, it is wiser t...

Multiple histograms and what will be the best way to put mean and std of data into a plot?

You can use text function to add annotations anywhere on the plots. By the way, If A, B, and C are column vectors, it is wiser t...

bijna 2 jaar ago | 0

Answered

How to create contour plot within a 2D plot

When you want to draw multiple plots within one axes, you should put all of the commands between hold on and hold off. hold on ...

How to create contour plot within a 2D plot

When you want to draw multiple plots within one axes, you should put all of the commands between hold on and hold off. hold on ...

bijna 2 jaar ago | 0

Answered

Combine parallel and Rapid Accelerator Mode for an optimization task with ga

You should set ga to pass all of the population to the objective function at once, and there you implement the parallelization i...

Combine parallel and Rapid Accelerator Mode for an optimization task with ga

You should set ga to pass all of the population to the objective function at once, and there you implement the parallelization i...

bijna 2 jaar ago | 0

| accepted

Answered

Transferring Linear Models to excel/csv

It's better to first design a 49x1 cell array and write the outputs of each experiment to the corresponding element of the array...

Transferring Linear Models to excel/csv

It's better to first design a 49x1 cell array and write the outputs of each experiment to the corresponding element of the array...

bijna 2 jaar ago | 0

| accepted

Answered

Simulink scope not working correctly

I created your model and I expected a constant line, but I also got a single marker. Do the following as a workaround: In Cons...

Simulink scope not working correctly

I created your model and I expected a constant line, but I also got a single marker. Do the following as a workaround: In Cons...

bijna 2 jaar ago | 0

Answered

how to generate chromosome?

Assuming you want search agents in the rows and design variables in the columns: PopulationSize = 40; nvars = 20; Populati...

how to generate chromosome?

Assuming you want search agents in the rows and design variables in the columns: PopulationSize = 40; nvars = 20; Populati...

bijna 2 jaar ago | 0

Answered

how to understand firefly algorithm

You should define them as design variables. I recommend that you first read thoroughly the nice documentation and source code of...

how to understand firefly algorithm

You should define them as design variables. I recommend that you first read thoroughly the nice documentation and source code of...

bijna 2 jaar ago | 0

| accepted

Solved

Magic is simple (for beginners)

Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

bijna 2 jaar ago

Solved

Make a random, non-repeating vector.

This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

bijna 2 jaar ago

Solved

Roll the Dice!

*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

bijna 2 jaar ago

Solved

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

bijna 2 jaar ago

Solved

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

bijna 2 jaar ago

Solved

Return the first and last character of a string

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

bijna 2 jaar ago

Solved

Check if number exists in vector

Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

bijna 2 jaar ago

Solved

Getting the indices from a vector

This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

bijna 2 jaar ago

Answered

Does anyone know where I can find the constant power/complex block in the bottom left corner? Thanks!

Right-click on the block and select Help. The documentation page of that block will be opened. There you can see which libraries...

Does anyone know where I can find the constant power/complex block in the bottom left corner? Thanks!

Right-click on the block and select Help. The documentation page of that block will be opened. There you can see which libraries...

bijna 2 jaar ago | 2

Answered

Average from a excel sheet and store it to a different excel sheet.

You should first read the data from the excel file using readmatrix, then do any calculations like mean, and finally write to th...

Average from a excel sheet and store it to a different excel sheet.

You should first read the data from the excel file using readmatrix, then do any calculations like mean, and finally write to th...

bijna 2 jaar ago | 0

Solved

Swap the input arguments

Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

bijna 2 jaar ago

Solved

Reverse the vector

Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

bijna 2 jaar ago

Solved

Generate a vector like 1,2,2,3,3,3,4,4,4,4

Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

bijna 2 jaar ago

Solved

Finding Perfect Squares

Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

bijna 2 jaar ago

Solved

Maximum value in a matrix

Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

bijna 2 jaar ago

Answered

How can i write and use the attached matrix in MATLAB for any value of N

M = (n:-1:0) + (0:n)'; or M = (n:2*n)' - (0:n);

How can i write and use the attached matrix in MATLAB for any value of N

M = (n:-1:0) + (0:n)'; or M = (n:2*n)' - (0:n);

bijna 2 jaar ago | 1

Answered

How do I shift columns (left or right) in a matrix

I used the vectorization capability of MATLAB, so it is faster and there is no need for a for loop. data = rand (5,16); chann...

How do I shift columns (left or right) in a matrix

I used the vectorization capability of MATLAB, so it is faster and there is no need for a for loop. data = rand (5,16); chann...

bijna 2 jaar ago | 0

Answered

Where can i find the power calculation block in simulink?

Go to library browser. Then open Simulink > Quick insert > Math operations. You can find the Power block here. Or Instead of ...

Where can i find the power calculation block in simulink?

Go to library browser. Then open Simulink > Quick insert > Math operations. You can find the Power block here. Or Instead of ...

bijna 2 jaar ago | 1

Answered

How can I fit 3-D scatter points with value?

If your model for the relationship between (theta, r, z) triplets and the pressure is linear, use regress. Otherwise, use lsqcur...

How can I fit 3-D scatter points with value?

If your model for the relationship between (theta, r, z) triplets and the pressure is linear, use regress. Otherwise, use lsqcur...

bijna 2 jaar ago | 0

| accepted