Question

Reshaping/vectorizing a n-d matrix to a vector along each dimension

Lets say I have a matrix given by a=randn(4,4,5); How do I get a 80*1 vector along each dimension. That is ...

3 years ago | 1 answer | 0

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

3 years ago

Answered

How to utilize nodes to plot a 3D object?

Ok. I have attached the script to do this. You are reading the data wrong. I have also attached the image. Hope this helps. ...

How to utilize nodes to plot a 3D object?

Ok. I have attached the script to do this. You are reading the data wrong. I have also attached the image. Hope this helps. ...

3 years ago | 0

Answered

Develop a Matlab function that remove all zeros in an input vector(using while loop)

I agree with cvklpstunc that you dont need a while loop. If you are still looking for a while loop implementation, here is the c...

Develop a Matlab function that remove all zeros in an input vector(using while loop)

I agree with cvklpstunc that you dont need a while loop. If you are still looking for a while loop implementation, here is the c...

3 years ago | 0

Answered

Distance from time and velocity vectors..HELP

trapz cannot be used here because you are passing only one value for x and y. Moreover direct integration is not t...

Distance from time and velocity vectors..HELP

trapz cannot be used here because you are passing only one value for x and y. Moreover direct integration is not t...

3 years ago | 0

Question

Optic FLow only on interest points

I was wondering if there is any method to compute optical flow between two frames only considering key or interest points(which ...

3 years ago | 1 answer | 0

Question

Hand segmentation from an RGB and depth image obtained from kinect device

Hi all. I am trying to use the <http://eeeweba.ntu.edu.sg/computervision/people/home/renzhou/HandGesture.htm dataset> from this ...

3 years ago | 1 answer | 0

Answered

How to save iteration values as array if for loop- for t=0:0.5:3?

Use another index value outside the loop and keep updating it inside the loop such as index=1 for t=0:0.5:3 ...

How to save iteration values as array if for loop- for t=0:0.5:3?

Use another index value outside the loop and keep updating it inside the loop such as index=1 for t=0:0.5:3 ...

3 years ago | 1

| accepted

Answered

How to change the positions of elements in a vector?

Using the find() function you can do this very easily. [R,c]= find(myVector==3) This gives you the positions of ...

How to change the positions of elements in a vector?

Using the find() function you can do this very easily. [R,c]= find(myVector==3) This gives you the positions of ...

4 years ago | 0

Answered

How do I delete columns from a matrix based on an array

As you can imagine there is more than one way to do this. here is one method.Not elegant but works A=[4 3 5 6 7; 1 4 ...

How do I delete columns from a matrix based on an array

As you can imagine there is more than one way to do this. here is one method.Not elegant but works A=[4 3 5 6 7; 1 4 ...

4 years ago | 1

Answered

Empty Matrix: 1-by-0 error

help linspace() y = linspace(x1,x2,n) generates n points. The spacing between the points is (x2-x1)/(n-1). so here...

Empty Matrix: 1-by-0 error

help linspace() y = linspace(x1,x2,n) generates n points. The spacing between the points is (x2-x1)/(n-1). so here...

4 years ago | 0

Answered

I am new in MATLAB. Please suggest me the procedure for how to pass the dataset files to the TreeBagger classifier.

Below is the Matlab documentation. Go through this. It is well written. https://www.mathworks.com/help/stats/treebagger.html ...

I am new in MATLAB. Please suggest me the procedure for how to pass the dataset files to the TreeBagger classifier.

Below is the Matlab documentation. Go through this. It is well written. https://www.mathworks.com/help/stats/treebagger.html ...

4 years ago | 0

Answered

How to find an unknown parameter from a equation fitted to a data-set in MATLAB 2016b ?

I might be wrong here. If you know all of these values and dont know only n cant you just find n through algebra. I mean solvi...

How to find an unknown parameter from a equation fitted to a data-set in MATLAB 2016b ?

I might be wrong here. If you know all of these values and dont know only n cant you just find n through algebra. I mean solvi...

4 years ago | 0

Answered

Compare results of three cells

Assuming you wish to find the maximum of the corresponding elements in each cell cell1={rand(1,120)}; cell2={rand(1...

Compare results of three cells

Assuming you wish to find the maximum of the corresponding elements in each cell cell1={rand(1,120)}; cell2={rand(1...

4 years ago | 0

Answered

Help with a minimize problem

I dont understand. two_var =@(x) 242*log(1-x(1)-x(2))+120*log(2*x(1)-x(1)^2-2*x(1)*x(2))+79*log(2*x(2)-x(2)^2-2*x(1)*x...

Help with a minimize problem

I dont understand. two_var =@(x) 242*log(1-x(1)-x(2))+120*log(2*x(1)-x(1)^2-2*x(1)*x(2))+79*log(2*x(2)-x(2)^2-2*x(1)*x...

4 years ago | 0

Answered

How to find the number of repeating sequence in an array?

You can do the following. Treat the sequence as a string. Divide the string into a cell with each cell containing 3 digits. Then...

How to find the number of repeating sequence in an array?

You can do the following. Treat the sequence as a string. Divide the string into a cell with each cell containing 3 digits. Then...

4 years ago | 0

| accepted

Question

How to join or merge two Image Data Stores?

If I have two image datastores and I wish to concatenate them. How can I do that? Thanks

4 years ago | 5 answers | 0

Question

Split an ImageDatastore with every 'pth' file per label

Hi, the splitEachLabel() for the imageDatastore() when used as if true [imds1,imds2] = splitEachLabel(imds,p) end ...

4 years ago | 1 answer | 0

Answered

Loading data in a function and passing it

In the else condition- write b=load('b.mat'), w=load('w.mat') etc. Does this solve your problem?

Loading data in a function and passing it

In the else condition- write b=load('b.mat'), w=load('w.mat') etc. Does this solve your problem?

4 years ago | 0

Question

How to nest a cell array with existing cell array

Hi, I have a cell array Cells which is 1 x 190, and each cell is again a 1 x 20 cell array. Now for each cell in this 1 x 20 arr...

4 years ago | 1 answer | 0

Solved

vectorization in N

For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

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

4 years ago

Solved

Find a subset that divides the vector into equal halves

Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

4 years ago

Solved

Determine the number of odd integers in a vector

Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

4 years ago

Solved

Given a window, how many subsets of a vector sum positive

Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

4 years ago

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

4 years ago

Solved

Reverse the Words (not letters) of a String

*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

4 years ago