Answered
Split the given string into characters
A char array such as str = '2.6ELKUxQKWPVJVHxxxxC.4xxxIxSxJJxxxxx' *already has different columns*. If you want to acce...

8 years ago | 0

Answered
converting irregular space data into regular spaced data for time line interpolation
I'm not entirely clear what your question is. If you want to retime some sampled data, the easiest is to use a <https://uk.mathw...

8 years ago | 0

| accepted

Answered
gives an error saying undefined fetch.suppose to display the contents of the car_info where primary key = value in noPlate
Is the |.| after the |fetch| a typo in the question or actually present in the code? If it's present in the code, then that's...

8 years ago | 0

Answered
Use of NationalInstruments.Tdms .Net assembly
I'm not sure it is possible to use the national instruments assemblies from matlab. I don't know exactly how it works but it loo...

8 years ago | 0

Answered
replace 0 with NaN for specific column in a matrix within cell
Since all your matrices are the same size, the easiest would be to get rid of the cell array and store all your matrices as a si...

8 years ago | 1

Answered
Why does stop(Timer) works, while Timer.stop does not?
That's certainly an interesting behaviour and it took me a while to figure out what is actually happening. It's an unintended si...

8 years ago | 6

| accepted

Answered
Catch terminal's error message
As Walter says, your example script will never execute because of the syntax error so try catch inside the file is no good. H...

8 years ago | 0

| accepted

Answered
compare all elements in a column with elements of another column
If I understood correctly: while true toremove = all(sum(my_matrix < permute(my_matrix, [1 3 2]), 3) == size(my_matri...

8 years ago | 0

Answered
How to extract specific rows from large data file
I wouldn't call your file _large_. Probably, the easiest (tested in R2018a, older versions may have a harder time detecting the ...

8 years ago | 1

| accepted

Answered
How can I use each element from an Array to substract other elements from other arrays and create new matrix?
distances = [KM_to_Durres, KM_to_Fier]; remainingrange = arrayfun(@(s) s.RangeInKM - distances, EV, 'UniformOutput', false)...

8 years ago | 1

| accepted

Answered
How do I take a small array, keyed by a datetime variable which is a subset of a larger array and replace the values in the larger array with the values from the smaller array?
[isinsmall, where] = ismember(bigtable.datevariable, smalltable.datevariable); bigtable(isinsmall, :) = smalltable(where, :...

8 years ago | 0

| accepted

Answered
Can we have an image in a matrix that can be called by a function?
# An image *is a matrix* # |imread| is one of many *functions* that returns an image as a matrix. So, I guess your question ...

8 years ago | 1

Answered
How can i remove an entire row or column of a matrix if the elements of the matrix in the row or column of the matrix has been flagged with a certain number?
First, a big warning, don't use |length| (for vectors |numel| is better) and certainly don't use |length| on a matrix. On a matr...

8 years ago | 0

| accepted

Answered
Reversing typecast in C
As James says, in matlab, and so for codegen I guess, it is indeed typecast(uint8values, 'double'); In plain C, it's al...

8 years ago | 0

| accepted

Answered
Matlab error: A possible cause of this error is that you forgot to initialize the variable, or you have initialized it implicitly using load or eval
<https://www.mathworks.com/help/matlab/ref/gamma.html |gamma|> is a function that ships with matlab. I suspect that you never i...

8 years ago | 0

| accepted

Answered
how to concatenate tables stored in a structure
As Stephen commented, the initial designed is flawed. numbered variables and field names should always be replaced by a single c...

8 years ago | 4

| accepted

Answered
I have a matrix which has with some rows and 3 columns. Each element of the matrix is a number. I want to add a new column to this matrix with each entry as a string 'abc'. How can i do that ?
That is not possible. A *matrix* is an homogeneous container. Every element is the same type. You can use non-homogeneous contai...

8 years ago | 0

Answered
Binary concatenation with repetition
c = sum(b .* 10.^(size(b, 2)-1:-1:0), 2) Of course, matlab displays the number 010 as 10. If you do want the display 010, t...

8 years ago | 0

Answered
Finding first series of consecutive negative numbers in an array
starts = strfind(sign(A), [-1 -1 -1 -1 -1]); starts(1)

8 years ago | 0

Answered
How to make a summation with index vector?
_I need to create a vector Z in which the first element is:_ col = 1:size(s, 2); Z = sum(col .* s - col/N, 2); %require...

8 years ago | 1

| accepted

Answered
is it possible to transfer values from matlab to visual basic . NET framework if so can you give me a step by step instruction on how to approach this please
_but failed several times_ Your question is so vague that it's impossible to answer properly. Maybe if you showed us what you...

8 years ago | 0

Answered
Number of times an element appears
I don't see what |prize| has to do with your question. The number of times each of something appears in a set is called the hist...

8 years ago | 0

Answered
How to merge two tables when the key variables are not common?
This is called an <https://www.mathworks.com/help/matlab/ref/outerjoin.html |outerjoin|>: A = array2table([100 200 1; 300 4...

8 years ago | 1

| accepted

Answered
saving a processed image of the same size as the original for comparison
If you have the computer vision toolbox you can use <https://www.mathworks.com/help/releases/R2018a/vision/ref/insertshape.html ...

8 years ago | 0

| accepted

Answered
Move empty cell in a row
Another option, which may or may not be faster than Rik's (I haven't tested but I suspect it's faster since it doesn't do any so...

8 years ago | 1

| accepted

Answered
Vector from loop into matrix and optimization
There are several problem with your code. In my opinion the biggest is that you don't use meaningful variable names and hence en...

8 years ago | 1

Answered
Why the headerlines are not always properly detected by readtable?
There is actually a _weird_ character at the start of the file. It is an UTF-8 BOM marker, EF BB BF. Unicode does not recommend ...

8 years ago | 0

| accepted

Answered
Cell array into numeric array. Date data type handling.
Use the modern <https://www.mathworks.com/help/matlab/ref/readtable.html |readtable|> rather than the ancient |xlsread|. |readta...

8 years ago | 0

| accepted

Answered
Delete days containing less than a specified amount of values
Note that your [H,E] = discretize(Adt, 'day'); Tally = accumarray(H, 1); could be written more simply as: Tally =...

8 years ago | 0

| accepted

Answered
First input must be a file name or a file identifier.
function Img = DicomReader(filename,N) Clearly your function expects a filename as the first argument D = squeeze(imag...

8 years ago | 0

Load more