Answered
How to store figures generated from matlab in database?
The simplest would be to save your figure as a .fig file and store the content of that file in your database (as a blob). Retrie...

9 years ago | 0

| accepted

Answered
getting an error: this statement is incomplete
*Important rule: Never use |eval|* And certainly not for generating dynamic fields when there is a more readable, lots easier...

9 years ago | 0

| accepted

Answered
How can I pass 2-D meshgridded var into a 3-D matrix?
Step 1: |permute| your vector so that it is along the 3rd dimension: zv = permute(zv, [3 2 1]); %if zv is a column vector ...

9 years ago | 0

| accepted

Answered
How to create multiple objects and add values in a for loop?
I can't reproduce the problem with the code you've posted: >> DwtNames = {'a', 'b', 'c'}; %dummy names ...

9 years ago | 1

Answered
How do I recombine matrices in this order?
If your matrices are not together in a cell array, e.g. they're individually numbered matrices, then * don't do that! * fix...

9 years ago | 0

| accepted

Answered
How to delete specific rows in this matrix?
Yes, you will get an index exceeds matrix dimension. Your loop is set to ends at |size(m, 1)| *as it was when you started*. Howe...

9 years ago | 2

| accepted

Answered
How can I correctly use two "for loops" and one "if statement" to insert selected data into a cell array?
The correct way to do what you want is not to use loops and if statements but operate on whole matrices at once. It will be a lo...

9 years ago | 0

| accepted

Answered
Unable to use mod function on cell array
Faster than using |cellfun| would be to convert the cell column to a matrix, perform the |mod| and convert back to a cell array:...

9 years ago | 1

Answered
Eliminating zeros and NaNs from cell array
_*Answer edited following the edit to the question:*_ If |v2| is a cell array of any size, then v2(i, num) is a 1x1 c...

9 years ago | 0

Answered
How to divide a bmp image into blocks?
Assuming your image size is a multiple of 8: img = imread('C:\somewhere\someimage.bmp'); numblockheight = size(img, 1) /...

9 years ago | 0

| accepted

Answered
Replace repeated pattern in text file
You're trying to loop over two different things at once. Much simpler: filepath = 'c:\somewhere\somefile.extension'; fil...

9 years ago | 0

| accepted

Answered
Replacing variables in a dataset
If the 0s are supposed to indicate missing values, then you should be using |NaN| instead. Assuming that the mean is supposed to...

9 years ago | 0

| accepted

Answered
Merging pdf without ghostscript
Matlab has no built-in pdf handling capabilities and if it had it would likely use ghostscript behind the scene, so you've left ...

9 years ago | 1

| accepted

Answered
how to know the number of regions of the image?
You use <https://uk.mathworks.com/help/images/ref/regionprops.html |regionprops|> on your segmented image. The number of element...

9 years ago | 0

Answered
How do I convert a string to a date?
Carefully read the documentation of the <https://uk.mathworks.com/help/matlab/ref/datetime-properties.html#prop_Format |Format|>...

9 years ago | 4

| accepted

Answered
Conversion from char to cell is not possible
Despite your statement, |A| is not a cell array, but a 2D char array. You can convert |A| into a cell array of char vectors usin...

9 years ago | 0

| accepted

Answered
Index exceeds matrix dimensions
_how could i solve this ?_ c = cat(3, red, green, blue); You were contatenating your arrays horizontally, resulting in a...

9 years ago | 0

| accepted

Answered
Plot problem while using "Markerindices"
Matlab is case sensitive. The name of the property is <https://uk.mathworks.com/help/matlab/ref/chartline-properties.html |Marke...

9 years ago | 0

| accepted

Answered
How to group rows by a column value which is a chararray
Most likely, [uniquevals, ~, subs] = unique(yourcellarray(:, 5), 'stable'); %stable is optional accumarray(subs, A) ...

9 years ago | 0

Answered
How to read MS word file(*.doc/docx).
The issue is not matlab. You'll have to go through exactly the same difficulties whichever language you use. The issue is more t...

9 years ago | 4

Answered
How to create column vector
See <https://uk.mathworks.com/help/matlab/ref/linspace.html |linspace|> And also, <https://uk.mathworks.com/help/matlab/getti...

9 years ago | 0

Answered
Output argument "R" (and maybe others) not assigned during call to "bisection_imj292".
What is not clear about the error message? Your function |bisection_imj292| defines an output called |R|, yet never assigns a va...

9 years ago | 2

Answered
How to keep file attributes by using Copyfile in Matlab
What you're seeing is the normal behaviour of file copy on all OSes. Matlab itself does not give you any way to override tha...

9 years ago | 1

| accepted

Answered
Does anyone know how I could find out the number of ends an arbitrary shape has e.g. an 'x' that is displayed in an image.
sum(bwmorph(bwmorph(yourbinaryimage, 'skel'), 'endpoints')) Should give you what you want. For more information, see <https...

9 years ago | 0

Answered
Sum over rows in a matrix for specific numbers in the last column
One simple way: group = cumsum(diff([0; A(:, end)]) ~= 0); result = splitapply(@sum, A(:, 1:end-1), group)

9 years ago | 3

Answered
find cells based on vector
At a guess (see Jan's comment): a = {[67 8 33] [1 2 3 5] [2 88 5] [3 66 7 90] [3] [66 78 12 1 44 6 77 3] [ 91 92 100]} d...

9 years ago | 0

| accepted

Answered
Approximate experimental data from multiple cells
_But it shows fmin = fmax_ Well, of course. I don't understand what you're trying to do but you have: [Q_Value, Q_Index] = ...

9 years ago | 0

Answered
How can I extract strings from a text file between certain strings not just once, but for the whole document?
If you're using regular expressions it's a complete waste of time to use |strfind| as well. Your example code does not create...

9 years ago | 0

Answered
How to replace portion of data set with another?
Assuming that both matrices have the same number of rows for your 5 to 10 range and that they're in the same order: b(b(:, ...

9 years ago | 0

| accepted

Answered
Some problem about ceil()
As others have commented, this is normal behaviour for computers using ieee floating points. Switching to some non-binary storag...

9 years ago | 1

Load more