Question

How does clearing nested function workspace works?

I found that this code works : function main message = 'hello world!'; figure; uicontrol('style','pushbutton',.....

5 maanden ago | 1 answer | 0

Answered

Index in position 2 exceeds array bounds

Since n = 4, for(j=1:1:n-1) will make j from 1 to 3. However pos is 4x2 matrix. When j is 3, pos(1,j) refers outside of the mat...

Index in position 2 exceeds array bounds

Since n = 4, for(j=1:1:n-1) will make j from 1 to 3. However pos is 4x2 matrix. When j is 3, pos(1,j) refers outside of the mat...

7 maanden ago | 0

Answered

What do the pixelIdxlist mean?

Let's say your image input for bwconncomp is BW. i.e. CC = bwconncomp(BW); Then CC.pixelIdxList{i} is linear indices of i-th i...

What do the pixelIdxlist mean?

Let's say your image input for bwconncomp is BW. i.e. CC = bwconncomp(BW); Then CC.pixelIdxList{i} is linear indices of i-th i...

7 maanden ago | 0

Answered

Visualization of data in 3 dimention.

F=5:1:50; % total 46 value w=2*pi*F; S=0:1:100;%total 101 value [wM,SM]=meshgrid(w,S); P = SM./wM; surf(w,S,P) You can c...

Visualization of data in 3 dimention.

F=5:1:50; % total 46 value w=2*pi*F; S=0:1:100;%total 101 value [wM,SM]=meshgrid(w,S); P = SM./wM; surf(w,S,P) You can c...

7 maanden ago | 1

| accepted

Answered

comparing pixels in 3x3 block

Assuming your matrix is A % collect green pixels query_right = A(2:end-1,3:end); query_left = A(2:end-1,1:end-2); query_dow...

comparing pixels in 3x3 block

Assuming your matrix is A % collect green pixels query_right = A(2:end-1,3:end); query_left = A(2:end-1,1:end-2); query_dow...

9 maanden ago | 1

| accepted

Answered

How do I add error bars in the Z-axis to a surface plot?

https://kr.mathworks.com/matlabcentral/fileexchange/73699-surferror try this

How do I add error bars in the Z-axis to a surface plot?

https://kr.mathworks.com/matlabcentral/fileexchange/73699-surferror try this

10 maanden ago | 1

Question

Collapsing preallocated memory of sparse matrix

I used sparse matrix for some calculation, and I roughly know how many nnz will be stored. So I preallocated a slightly larger m...

meer dan een jaar ago | 1 answer | 1

Question

Is there any way to set function (or method) output as comma separated list?

If we have an array of struct, like this: s(1).a = 1; s(2).a = 2; s(3).a = 3; and then if we get the field of this...

bijna 2 jaar ago | 1 answer | 0

Answered

Need help with my function (Basic Question)

Putting |message| inside |if| statement is better. And also I found some mistake in the inequality signs. if 0<= pH && pH...

Need help with my function (Basic Question)

Putting |message| inside |if| statement is better. And also I found some mistake in the inequality signs. if 0<= pH && pH...

ongeveer 2 jaar ago | 0

Answered

Matrix Manipulation of a specific column

Assuming |Data| is the matrix that containing your data, threshold = 10; for i = size(Data,2) pickedColumn = ...

Matrix Manipulation of a specific column

Assuming |Data| is the matrix that containing your data, threshold = 10; for i = size(Data,2) pickedColumn = ...

ongeveer 2 jaar ago | 0

Question

How to get all possible rearrange permutations of array with repeated elements?

I have some DNA sequences to rearrange 'ACTCACATCTGGTTCCTCTA' and I need all possible permutations of this (4 'A', 7 'T'...

ongeveer 2 jaar ago | 1 answer | 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 ...

meer dan 2 jaar 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 ...

meer dan 2 jaar ago

Solved

Determine if input is odd

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

meer dan 2 jaar ago

Solved

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

meer dan 2 jaar 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:...

meer dan 2 jaar ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

meer dan 2 jaar ago