Answered
can you please help me to find the errors in my code.
This may or may not fix the problem since we don't know anything about |random_walker|: seeds = rand(2, 1); %if you wanted...

9 years ago | 0

Answered
help with nested loops error
_"Thank you very much, it works now!"_ Well, after a fashion, it will have got rid of one error, but the code definitively wo...

9 years ago | 1

| accepted

Answered
How to Exclude Some Fields While Using the Function structfun?
I assume this is related to your <https://uk.mathworks.com/matlabcentral/answers/328109-how-to-use-a-for-loop-to-dynamically-ass...

9 years ago | 0

| accepted

Answered
How can I obtain all possible combinations of given values in vector ?
v =[2 4 8 3]; %for example c = arrayfun(@(x) 0:x, v, 'UniformOutput', false); [c{:}] = ndgrid(c{:}); allcombs = cell...

9 years ago | 1

| accepted

Answered
How to change colour (black to white) in binary image?
yourbwimage = ~yourbwimage Simple as that, or yourbwimage = logical(1 - yourbwimage)

9 years ago | 2

| accepted

Answered
How to Use a For Loop to Dynamically Assign the Values of Struct Fields to a Matrix?
cell2mat(structfun(@(f) {f}, A.B)) would work

9 years ago | 0

| accepted

Answered
Create cell arrays from doubles
Same as Image Analyst, I think that you're probably needlessly complicating things and that you don't need cell arrays. For exa...

9 years ago | 1

Answered
How read the 3D image ?
I'm assuming you're using this <https://uk.mathworks.com/matlabcentral/fileexchange/21993-viewer3d/content/ReadData3D/mha/mha_re...

9 years ago | 0

| accepted

Answered
Strcmp in textboxes of Rock Paper Scissors
The whole purpose of the homework is to make you think about what the algorithm should be. Delegating that task to others is not...

9 years ago | 0

Answered
How can I join two or more mstruct in matlab?
Probably the easiest way is to convert the structures to tables, then use the <https://www.mathworks.com/help/matlab/ref/join.ht...

9 years ago | 0

| accepted

Answered
Colormap based on contour values
function cmap = geblueredcolormap(cmin, cmax) assert(cmin<0 & cmax> 0, 'colormap does not cross zero'); zeroidx = ro...

9 years ago | 1

| accepted

Answered
remove embedded data from image after recovery
Assuming you're talking about steganography and not hiding the text in the image attributes, then you simply can't. The whole...

9 years ago | 1

| accepted

Answered
Fixed values of randn at starting?
If you want to have the same stream of random numbers every time you run your code, simply set the seed of the random generator ...

9 years ago | 0

Answered
cellfun with Frobenius norm
Use an anonymous function: nm.a = cellfun(@(m) norm(m, 'fro'), a)

9 years ago | 0

| accepted

Answered
How to display an image using given x coordinates(256*256) and y coordinates (256*256)
I believe I showed you how to get the image based on the coordinates in <https://uk.mathworks.com/matlabcentral/answers/326624-h...

9 years ago | 0

Answered
How do I extract number from file name?
An integer is a number with no fractional part so 1443242345.88 is *not* an integer. numbers = str2double(regexp(filenames,...

9 years ago | 1

Answered
Problems with MATLAB Engine API for Java
It would help if you used the documentation that come with your version. In R2016a, you will find no mention of the java engine,...

9 years ago | 1

| accepted

Answered
Function and mask : from vector to line
Your question is very unclear. What does _"changes the orientation from vectors to lines"_ mean? Do you mean that it changes the...

9 years ago | 0

| accepted

Answered
Details for 2017a
Either you have access to the pre-release, in which case you should have received a link to the pre-release notes in the email t...

9 years ago | 1

| accepted

Answered
Handling large arrays - fragment into vectors?
I agree with Jan, the proper way to store your data in memory would be a cell array. I'd use a kx3 cell array, where column 1 an...

9 years ago | 3

| accepted

Answered
Use griddedinterpolant to interpolate over missing values
The shape of your coordinate inputs is indeed an issue, but a gridded interpolant needs a full grid, one without any hole, so yo...

10 years ago | 1

Answered
Im trying to find the summation from k=1 to 25, with the equation being k^2. This is my code, how do i get it do only display the final number only, not the ones in between?
If you use this exact code: Sum=0; for k=1:25; Sum = Sum + k.^2 end disp(Sum) and you get the error _"Ind...

10 years ago | 1

| accepted

Answered
Using loop to extract fields from a struct
See <https://www.mathworks.com/help/releases/matlab_prog/generate-field-names-from-variables.html this page from the doc>. Basi...

10 years ago | 3

Answered
hi, i need to divide 64x64 binary image into 3x3 overlapping blocks, then in each block ,if center value is 0 leave that block as it is, else that block converted into decimal number ,
m = randi([0 1], 64, 64); %demo matrix out = zeros(size(m) - 3); for col = 1 : size(m, 2) - 3 for row = 1 : siz...

10 years ago | 0

| accepted

Answered
Can you explain how a number smaller than realmin can still be represented using 64-bit floating point representation?
From the doc: _" |realmin| returns the smallest positive *normalized* floating-point number"_ normalised is the key word here...

10 years ago | 2

Answered
Is the a max size for conv2
As discussed <http://undocumentedmatlab.com/blog/convolution-performance by Yair>, matlab's convolution seem to be using the sta...

10 years ago | 1

| accepted

Answered
Error: ()-indexing must appear last in an index expression.
In your anonymous function what is p(2)(sqrt(2)) meant to do? It's clearly not valid matlab. Perhaps you are missing an ...

10 years ago | 0

Answered
Write table with several header lines to file
headerlines = {'AG A&K, IG KlimAT'; 'HBI, 2017-02-23 03:46:04'; '+QSLX 100.7'; ...

10 years ago | 1

Answered
Is it possible to do a SVN update from command window / m-files?
I don't think there is. If you're on Windows, I would just install TortoiseSVN and invoke the command line tools that come w...

10 years ago | 0

| accepted

Answered
MSB after converting decimal values to binary
As Walter explained, the code converts a double into its binary representation. Due to the way doubles are <https://en.wikipedia...

10 years ago | 0

Load more