Answered
How do I create a 2^n by n matrix that the rows of the matrix enumerate all the possibilities for a n digit binary number?
Use |dec2bin| to get the string representation. Subtract '0' from the string to convert characters '0' and '1' to numbers 0 and ...

11 years ago | 1

| accepted

Answered
MATLAB does not start up. It does not find "the entrance point on the procedure CancelloEx"
Which operating system? |CancelIoEx| only exists on Windows Vista and up. Note that Windows XP is not listed in the list of <htt...

11 years ago | 0

Answered
How to make a matrix that depends on two other matrices?
z = sqrt(1 - x.^2 - y.^2) ?

11 years ago | 0

Answered
How Do I find unique values of an element in a matrix
<http://www.mathworks.com/help/releases/R2015b/matlab/ref/unique.html |unique|> together with <http://www.mathworks.com/help/rel...

11 years ago | 1

Answered
xor value always get zero
<http://www.mathworks.com/help/releases/R2015b/matlab/ref/xor.html |xor|> is a *logical* operator that either return 0 (if both ...

11 years ago | 2

| accepted

Answered
How can i change a filename.
Most (all?) operating systems won't let you rename / move a file if it's in use (meaning it's been opened). Since you open the f...

11 years ago | 1

| accepted

Answered
How to make a series of consecutive numbers using a nested for loop?
Maybe one of these is what you want. It's really not clear what you want to do within the loops: Possible solution #1: l...

11 years ago | 0

Solved


multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

11 years ago

Solved


Breaking Bad Tiles (Spelling with Element Symbols)
Given a word, how you would spell it with element symbols from the periodic table? For instance, if given the string "Paper", yo...

11 years ago

Answered
Mask making help - Divide a meshgrid in to 'boxes' and change the values of the cells in each 'box'
I would use |mat2cell| and |cell2mat| to divide your mesh and reconstruct it. height = 680; %much better name than x wi...

11 years ago | 1

Answered
Set image roi to zero
A 10x10 region can't be centered on a pixel. It needs to have an odd size. Anyway: yourimage(196:205, 196:205, :) = 0

11 years ago | 0

Answered
I am looking to generate an 8x8 tridiagonal matrix with random integers, how do I do this?
You're nearly there. Rather than passing a scalar, pass 3 random vectors. If you want integers, use |randi| to generate them: ...

11 years ago | 2

Answered
List values of variables with wildcard
What you're trying to do sounds iffy. You should not be manipulating data by their variable names. Saying that, it's very easy b...

11 years ago | 0

| accepted

Answered
Random points moving from boundary
Rather than checking if a random point is outside your allowed range and retrying, you'd generate random points within your allo...

11 years ago | 0

| accepted

Answered
Splitting a large column into other columns
Converting your |datetime| array to a number of days since a reference day is easy. Subtract the reference day from the |datetim...

11 years ago | 1

Answered
Find a column number from a cell array
You need to apply the <http://www.mathworks.com/help/releases/R2015b/matlab/ref/isempty.html |isempty|> function to each element...

11 years ago | 0

| accepted

Answered
How can I create a sliding window centered on a current pixel to impose over an impulse noise affected gray-scale image?
The normal way of removing impulse noise is to deconvolve the image with the psf of the impulse. There's a function in matlab th...

11 years ago | 1

| accepted

Answered
How to make each vector of equal size in a cell by adding NAN
c = {rand(1, 2544); rand(1, 2545); rand(1, 2544)} %demo data maxlength = max(cellfun(@numel, c)); newc = cellfun(@(v) [v...

11 years ago | 1

| accepted

Answered
strange occurrence with sum function
Don't you think that the |\| in your code look odd? You're doing a <http://www.mathworks.com/help/matlab/ref/ldivide.html lef...

11 years ago | 1

Answered
Generate all possible combinations of a few variables of a maximum length using certain mathematical operators/functions?
There are three parts to what you want: # generate all possible combinations of variables with an unary operator # generate...

11 years ago | 1

| accepted

Answered
Split vector into smaller vectors, then separate
As per Stephen's comment, convert your cell array into a non-scalar structure (it should use more or less the same amount of mem...

11 years ago | 0

| accepted

Answered
How to calculate th standard deviation for a part of a matrix?
The standard deviation of the standard deviation of the rows will not be the same as the standard deviation of the whole matrix....

11 years ago | 1

| accepted

Answered
How do I perform this operation using for loop? or any other approach?
I'm not sure where the difficulty lies for you. As you say in your question, simply use a |for| loop. You probably want to stor...

11 years ago | 0

| accepted

Answered
how to break the input computer file into a series of bytes using MATLAB code?
By default <http://www.mathworks.com/help/matlab/ref/fread.html |fread|> reads the file as bytes: fid = fopen('yourfile', '...

11 years ago | 0

| accepted

Answered
Why might fopen fail on a tcpip object (127.0.0.1) ?
Several possibilities: # Your firewall / antivirus is blocking the connection # There is nothing listening on port 9300 # t...

11 years ago | 1

| accepted

Answered
How can i fix the error of index out of bounds for an image
Assuming that you're running the exact code that you've attached, the error certainly shouldn't occur. I can also see two possib...

11 years ago | 0

| accepted

Answered
Converting a cell array containing more cell arrays to one cell matrix
If all the subcells are the same size, it's very simple to obtain your A (3x4 cell array) C = {{[2013] 'January' [7] 'S1.13...

11 years ago | 0

| accepted

Answered
How to convert cell into mat by single command?
Since all the vectors in your cell array have all different numbers of columns but just one row, the only matrix you can put the...

11 years ago | 0

Answered
Remove structs from an array of structs
|=| is for assignment, |==| is for comparison. However, |==| does not work with strings, you use <http://www.mathworks.com/help/...

11 years ago | 1

| accepted

Answered
How to impose a window centered on the current pixel of an image?
Use <http://www.mathworks.com/help/images/ref/nlfilter.html |nlfilter|>: nlfilter(img, [11 11], @(block) max(block(:)))

11 years ago | 0

| accepted

Load more