Solved

Matlab Basics II - Intervals

Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

11 months ago

Answered

Storing values from a for loop

Hi, CustAmt = input('How many customers would you like to examine?: '); for x = 1:CustAmt Cust(x).name = input('What...

Storing values from a for loop

Hi, CustAmt = input('How many customers would you like to examine?: '); for x = 1:CustAmt Cust(x).name = input('What...

12 months ago | 0

Answered

what is scenario of simulink and stateflow

Hi, If our/your concepts has state based, then we should use stateflow otherwise wil use simulink. For example, In car, Gear b...

what is scenario of simulink and stateflow

Hi, If our/your concepts has state based, then we should use stateflow otherwise wil use simulink. For example, In car, Gear b...

12 months ago | 0

Solved

Make a checkerboard matrix

Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

12 months ago

Solved

Triangle Numbers

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

12 months ago

Answered

how to subtract small window from an image by shifting pixel by pixel

Hi, inp_img = double(imread('cameraman.tif')); figure subplot(1,2,1); imshow(inp_img,[]); sub_mask_window = [14 25 16; 6 32...

how to subtract small window from an image by shifting pixel by pixel

Hi, inp_img = double(imread('cameraman.tif')); figure subplot(1,2,1); imshow(inp_img,[]); sub_mask_window = [14 25 16; 6 32...

12 months ago | 0

| accepted

Answered

How i can write array cell to excel sheet using loops?

Hi ahamd, use below script. % with for loop input_data = {'glcm11','glcm12','glcm13','glcm14'}; for i = 1 : length(input_dat...

How i can write array cell to excel sheet using loops?

Hi ahamd, use below script. % with for loop input_data = {'glcm11','glcm12','glcm13','glcm14'}; for i = 1 : length(input_dat...

12 months ago | 0

Answered

How to find Matlab Function blocks in a model?

Hi Hadi Zyien Yes, We have to use find_system to find matlab function block. After that, we need to use get_param command for...

How to find Matlab Function blocks in a model?

Hi Hadi Zyien Yes, We have to use find_system to find matlab function block. After that, we need to use get_param command for...

12 months ago | 0

Answered

PNSR formula psnr=20.0* (log10(255/sqrt(mse)));

Hi Faizullah We can use 1 instead of 255, if your input image is logical (max pixel range is 1 ) or your image is uint8 then y...

PNSR formula psnr=20.0* (log10(255/sqrt(mse)));

Hi Faizullah We can use 1 instead of 255, if your input image is logical (max pixel range is 1 ) or your image is uint8 then y...

12 months ago | 1

| accepted

Answered

How can I solve if condition in for loop matrix?

Hi use below code for your query. Here, B will check all rows, each column in A is less than, then it will allow to next iter...

How can I solve if condition in for loop matrix?

Hi use below code for your query. Here, B will check all rows, each column in A is less than, then it will allow to next iter...

12 months ago | 0

| accepted

Solved

Arrange vector in ascending order

Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

12 months ago

Solved

De-dupe

Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

12 months ago

Solved

Vector creation

Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

12 months ago

Solved

Doubling elements in a vector

Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

12 months ago

Solved

Whether the input is vector?

Given the input x, return 1 if x is vector or else 0.

12 months ago

Solved

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

12 months ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

12 months ago

Answered

how to get image from specific folder and resize each image and save them is a new folder

HI, Before reading the image (imread), you shoud change directory, where the files are present, as like as below clc; close ...

how to get image from specific folder and resize each image and save them is a new folder

HI, Before reading the image (imread), you shoud change directory, where the files are present, as like as below clc; close ...

12 months ago | 1

| accepted

Answered

i want to send binary data from port of PC through GUI in MATLAB.i Need a code of this .is anyone here to help me?

Hi Abdul, Here I have attached pushBotton_comport.m and .fig file and screen shot for the same. I think this is what you are...

i want to send binary data from port of PC through GUI in MATLAB.i Need a code of this .is anyone here to help me?

Hi Abdul, Here I have attached pushBotton_comport.m and .fig file and screen shot for the same. I think this is what you are...

12 months ago | 0

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.

1 year ago

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

1 year ago

Answered

Error: "Unable to read some of the variables due to unknown MAT-file error."

Hi Will Q, I can load 2nd (exampleActivations2) mat file data % load_mat = load('exampleActivations2.mat') load_mat = ...

Error: "Unable to read some of the variables due to unknown MAT-file error."

Hi Will Q, I can load 2nd (exampleActivations2) mat file data % load_mat = load('exampleActivations2.mat') load_mat = ...

1 year ago | 0

Answered

How to pass inputs to simulink for nested structures with array of structures

Hi You should create structure as like below. a = struct ('b',1,'c',2,'d',struct('f',{3,4,5},'g',{6,7,8},'h', ... {struct...

How to pass inputs to simulink for nested structures with array of structures

Hi You should create structure as like below. a = struct ('b',1,'c',2,'d',struct('f',{3,4,5},'g',{6,7,8},'h', ... {struct...

1 year ago | 0