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

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

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

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

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

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

3 mois ago | 0

Solved

Add more zeros

Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

3 mois ago

Solved

Convert a structure into a string

Convert the contents of each fields into a string. Example with an input structure s with 2 fields : s.age = '33' s....

3 mois ago

Answered

How to assign values to 100 by 2 matrix?

x=ones(100,2); x(1:end,1) =2; x(1:end,2) =3; Try the above code. Thanks in advance!!!

How to assign values to 100 by 2 matrix?

x=ones(100,2); x(1:end,1) =2; x(1:end,2) =3; Try the above code. Thanks in advance!!!

3 mois ago | 1

Answered

How to read a video and then write it, resulting to exact same video file ( same file size , same pixel values )

Hi, sotiraw sotiroglou Use this below code. Vptr = VideoReader('traffic.avi'); writer = VideoWriter('delete_me.avi', 'Motion ...

How to read a video and then write it, resulting to exact same video file ( same file size , same pixel values )

Hi, sotiraw sotiroglou Use this below code. Vptr = VideoReader('traffic.avi'); writer = VideoWriter('delete_me.avi', 'Motion ...

4 mois ago | 0

Answered

save variable from callback function of GUI

Hi Fabio Righetti , I think, we can get the vaiable using global variable. so we first decalre a gloabal varible ,here "data" ...

save variable from callback function of GUI

Hi Fabio Righetti , I think, we can get the vaiable using global variable. so we first decalre a gloabal varible ,here "data" ...

4 mois ago | 1

| accepted

Question

How can we Systematically pause Simulink model and update the variable and continue model from Matlab command line

Hi Guys, I have few querys , how can we update the variable during simulaton time. Here I have created simple model. Param...

4 mois ago | 0 answers | 0

Answered

how to change image format

Hi, @saeed hassiny. Use below code. clc clear all %% Get the info cd 'Images' img_dir = dir('*.pgm'); cd .. len...

how to change image format

Hi, @saeed hassiny. Use below code. clc clear all %% Get the info cd 'Images' img_dir = dir('*.pgm'); cd .. len...

4 mois ago | 0

Solved

Find out sum of all elements of given Matrix

Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

4 mois ago

Solved

Sum the numbers on the main diagonal

Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

4 mois ago

Solved

Kinetic Energy

Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

4 mois ago

Solved

Matlab Basics - Convert a row vector to a column vector

Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

4 mois ago

Solved

Program an exclusive OR operation with logical operators

Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

4 mois ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

4 mois ago

Solved

Guess Cipher

Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

4 mois ago

Solved

Fibonacci-Sum of Squares

Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

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

5 mois ago

Submitted

Calculator

This is very simple and basic arithmetic operation.

11 mois ago | 3 downloads |

Question

how to do repeating numbers in array

Hi I have an array like [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0]. I want output like, [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5...

11 mois ago | 2 answers | 0

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

12 mois ago

Solved

Swap the first and last columns

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

12 mois ago

Solved

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

12 mois ago

Solved

Column Removal

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

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

plus d'un an ago