Respondida
Set condition when index exceeds array bounds
I would recommend that you use KSSV's answer to modify your loop so it indeed stops at numel(x)-1. The alternative is to fix yo...

más de 7 años hace | 0

Respondida
Undefined variable "vision" or class "vision.TextInserter".
Install the computer vision toolbox. If you don't have a license for it, then you cannot use the code you're trying to use.

más de 7 años hace | 0

Respondida
How do I convert relative Gregorian days since 1935-01-01 to calendar datetime (days with hours,mins,sec)?
Probably, dt = datetime(yourtimestamps*24*3600, 'ConvertFrom', 'epochtime', 'Epoch', '1935-01-01')

más de 7 años hace | 0

| aceptada

Respondida
Finding rows of matrix A that do not overlap with any rows in Matrix B (without using for or while loop)
A = [ 0 50; 200 250; 300 350; 400 450]; B = [50 200; 200 300; 300 400]; isoverlap = any(A(:, 1)' >= B(:, 1) & A(:, 2)' <= B(...

más de 7 años hace | 1

Respondida
Remove same element from vector
What you have completely failed to mention in your question and left for us to guess is that your E matrix represents the edges ...

más de 7 años hace | 0

Respondida
Renaming categories with accents
str = {'Á', 'É', 'Í', 'Ó', 'Ú','Ã','Ç','Â','Ê','Ô'}; strreplace = {'A', 'E', 'I', 'O', 'U','A','C','A','E','O'}; t = categoric...

más de 7 años hace | 0

| aceptada

Respondida
Error in the Code shown below:
Isn't the error obvious? You defin handles.text_ch as an empty array and then try to access its elements 1 to 32. Since it's emp...

más de 7 años hace | 0

Respondida
How do i change the length of a vector in a for loop without it causing an index out of bounds error?
You can't delete elements of an array while you're iterating over it unless you work in reverse and are extremely careful. Howe...

más de 7 años hace | 1

| aceptada

Respondida
how to create random number of 64 bit length like this for example'B8FF5AF858E2746937204FB9C8B102D7ECC50A60B4BA3944AC7A9F3C2DD4C4EF'
That number is not 64-bit long. It is 64 hexadecimal characters long, which would be 64*8 = 512 bits! To create a 64-character ...

más de 7 años hace | 0

| aceptada

Respondida
How to remove the unwanted characters and special symbols using regular expression?
"everything before '#' and every thing after'.' need to be cleared or truncated" then it's very easy: regexp(yourinput, '(?<=#...

más de 7 años hace | 2

| aceptada

Respondida
Is there a way to access a specific element of an output array without assigning the output to a variable first?
Yes, [ClassA.CBO.infArray](inds) attemps to index the return value of a function, which matlab does not allow. You could do the ...

más de 7 años hace | 1

| aceptada

Respondida
To concatenate two images
"but its not working" is a useless statement without telling us why it's not working (you get an error, if so, what error? you ...

más de 7 años hace | 3

Respondida
How can I fix my code so that my information displays to the screen in a user friendly format?
How about: disp(read); in your while loop? Otherwise, use something more sophisticated such as fprintf. I don't understand wh...

más de 7 años hace | 0

Respondida
How can I replicate {:} behaviour when overloading subsref in my class?
I think it was a bad design decision of mathworks to use the same function for all types of indexing forcing you to handle even...

más de 7 años hace | 0

Respondida
How to input text file into matlab as an array
Probably, the easiest: opts = detectImportOptions('15048.txt'); %let matlab figure out most of the file format opts.ImportErr...

más de 7 años hace | 1

Respondida
Is it possible to end this script once a negative number comes from the matrix? The final answer M has to be positive
I thought that I did that using the while loop function. Since your whole simulation is inside the while loop, the while test i...

más de 7 años hace | 0

| aceptada

Respondida
why does audiowrite cast int16 different than the cast function?
If you follow the code of audiowrite, the floating point array is never converted and is passed as is to asyncioimpl.OutputStrea...

más de 7 años hace | 1

| aceptada

Respondida
Help browser and academic license
Open your preferences in matlab. Under Help, change the documentation location from web to installed locally. Of course, if the ...

más de 7 años hace | 1

| aceptada

Respondida
How to access a string array and use the contents as titles within array2table
I would create your storehere array, this way: storehere = compose("mean of bootstrapped coherence between %s and %s", nchoosek...

más de 7 años hace | 0

| aceptada

Respondida
I am trying to convert the color of a flower from red to blue. I have picked the range of hue values that correspond to red(and orange and yellow) and replaced it with the hue values for blue. However a straight line keeps dividing the image.
Look at the result of size(g) and then the result of 1:size(g) When you pass a vector to the colon, :, it only uses the firs...

más de 7 años hace | 0

Respondida
I have a .txt file which is not in a 'MATLAB' friendly format and I am trying to manipulate the data so that I can then delimit it and plot it later
I don't know what format you want ultimately, nor what can change in the format of the file. This is how I'd start: filecontent...

más de 7 años hace | 0

Respondida
Index exceeds matrix dimensions.
"When I run those lines I get the following error but I don't understand why" That would be because find(vals==0) returns one (...

más de 7 años hace | 0

Respondida
Include "a" character in a wordcloud
Bear in mind that this is with base matlab. The text analytics toolbox, which I don't have, may have some better ways of doing w...

más de 7 años hace | 0

| aceptada

Respondida
How can I compute all the possible differences of the vectors in a matrix?
result = A - permute(A, [3 2 1]) would return a size(A, 1) x size(A, 2) x size(A, 1) array where result(i, :, j) is the differe...

más de 7 años hace | 0

| aceptada

Respondida
To group the matrix based on the number on their column (of non-zeros)
[row, column] = find(Matr); groups = splitapply(@(rows, columns) {[rows, columns]}, row, column, column)

más de 7 años hace | 1

| aceptada

Respondida
fopen / fprintf: Write to same file from independent processes
Your problem is not restricted to matlab. You would have the same problem in any other programming language. You basically have...

más de 7 años hace | 0

Respondida
Percentage of a value in a table rows matlab
A = [3 5 4 6 2 7 5 11 12 2; 1 4 3 6 7 5 3 7 12 10; 6 8 7 9 4 12 12 6 7 9] sum(A == 12, 2) / size(A, 2) * 100

más de 7 años hace | 0

| aceptada

Respondida
How to remove table data based on comparison between different columns in another table in MATLAB?
It's fairly simple to do. Annoyingly implicit expansion and bsxfun don't work with datetime so you have to use repmat to do the ...

más de 7 años hace | 0

| aceptada

Respondida
How can i re-write this bilinear search to help me understand?
I don't think whoever wrote that code understood what they were writing either. In particular, you have to wonder what was going...

más de 7 años hace | 0

Respondida
How to create a for loop to calc average of datas in a STRUCTURE?
First, note that in matlab, a structure is particular data type. Here you're using structure with its non-matlab meaning. It can...

más de 7 años hace | 1

| aceptada

Cargar más