Trained in neuroscience and electrophysiology but self-taught in programming. My solutions may not be the fastest or most elegant but on average they work at an above chance level.

Solved

Find the area of the four walls

If length, breadth and height of the walls are given, find the area of the four walls.

8 months ago

Solved

Find the dimensions of a matrix

Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

8 months ago

Solved

Sum of diagonal of a square matrix

If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

8 months ago

Solved

find the surface area of a cube

given cube side length x, find the surface area of the cube, set it equal to y

8 months ago

Solved

Rounding off numbers to n decimals

Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

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

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

8 months 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,...

8 months 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]

8 months ago

Solved

Most nonzero elements in row

Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

8 months ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

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

8 months ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

8 months ago

Question

Shuffling matrix regions while maintaining their shape

Hi all, I want to segment a matrix into parts, then move those parts around while maintaining their shape as far as possible (b...

8 months ago | 0 answers | 0

Question

Calculating mean integrated squared error (MISE)

Hi all, I have a bivariate probability distribution ( f1(x) ) and a histogram of real data that I want to compare to it ( f2(x)...

10 months ago | 1 answer | 0

Question

Histograms - why does the smallest binsize always give the smallest mean integrated squared error?

Hi all, I have a bit of a specialised question involving histograms and mean integrated squared error (MISE). I want to find th...

11 months ago | 1 answer | 0

Answered

How to do Chi square with contingency tables?

Crosstabs expects the raw data as vectors, if you only have counts you will need to expand your data into vectors, for instance ...

How to do Chi square with contingency tables?

Crosstabs expects the raw data as vectors, if you only have counts you will need to expand your data into vectors, for instance ...

11 months ago | 1

| accepted

Answered

Undefined function or variable 'netcdf'

I think your line is supposed to be: f = netcdf.open('algiers_bay.grd','r'); Because netcdf on it's own doesn't do anything,...

Undefined function or variable 'netcdf'

I think your line is supposed to be: f = netcdf.open('algiers_bay.grd','r'); Because netcdf on it's own doesn't do anything,...

11 months ago | 0

Answered

How to plot Data from a table filled with strings?

I think your problem is just that the cell array contains strings of different lengths, you can try converting them to numbers i...

How to plot Data from a table filled with strings?

I think your problem is just that the cell array contains strings of different lengths, you can try converting them to numbers i...

11 months ago | 0

| accepted

Answered

Can anyone tell me how does this code works?

Hi, It is difficult to know exactly what the code is doing without the data files it is loading. However, at first glance I wo...

Can anyone tell me how does this code works?

Hi, It is difficult to know exactly what the code is doing without the data files it is loading. However, at first glance I wo...

11 months ago | 0

| accepted

Answered

i have a data set containing urls of images.How can i download all the images from those urls using matlab?

You can read the data into Matlab using importdata: https://uk.mathworks.com/help/matlab/ref/importdata.html?s_tid=doc_ta Then...

i have a data set containing urls of images.How can i download all the images from those urls using matlab?

You can read the data into Matlab using importdata: https://uk.mathworks.com/help/matlab/ref/importdata.html?s_tid=doc_ta Then...

1 year ago | 0

Answered

Please provide in depth details on PCA MATLAB function

How many features do you give the PCA when you give it the dataset? Just the XY values you plotted in the first graph? Or do you...

Please provide in depth details on PCA MATLAB function

How many features do you give the PCA when you give it the dataset? Just the XY values you plotted in the first graph? Or do you...

2 years ago | 0

| accepted

Answered

how do i live plot 3 different values?

Can you be more precise in what you want to achieve? For example, here is the Matlab help example given for animatedline: numpo...

how do i live plot 3 different values?

Can you be more precise in what you want to achieve? For example, here is the Matlab help example given for animatedline: numpo...

2 years ago | 0

Answered

Maximum perpendicular distance from line to convex hull boundary

I had to do something similar to this some time ago, sorry I don't really remember the specifics but I used rayTriGPU: https://...

Maximum perpendicular distance from line to convex hull boundary

I had to do something similar to this some time ago, sorry I don't really remember the specifics but I used rayTriGPU: https://...

2 years ago | 0

| accepted

Answered

Model Based Reinforcement Learning

Your agent shouldn't be able to make 'invalid' actions at all. For undesired actions, as you say the correct reward function wit...

Model Based Reinforcement Learning

Your agent shouldn't be able to make 'invalid' actions at all. For undesired actions, as you say the correct reward function wit...

2 years ago | 0

Answered

How to Filter Datasheet

Why do you want to do this? Its certinaly poossible to write code to do what you want, I'm just wondering if maybe there is a m...

How to Filter Datasheet

Why do you want to do this? Its certinaly poossible to write code to do what you want, I'm just wondering if maybe there is a m...

2 years ago | 0

Answered

compress a 3D volume into a 2D image

Could you project the data along each axis (using mean(data,dim) for instance) to get 3 two dimensional images and then do the t...

compress a 3D volume into a 2D image

Could you project the data along each axis (using mean(data,dim) for instance) to get 3 two dimensional images and then do the t...

2 years ago | 1

| accepted