Answered
Find specific text within string ('contains' command?)
If you're looking for an exact match, then it's strcmp you want, not contains. find(strcmp(list, searchinput))

9 jours ago | 0

| accepted

Answered
Creating a Random Upper Triangular Matrix with Unique Entries for Efficiently Computing Matrix Exponential.
The main issue is that a lot of your code is not valid matlab syntax, or doesn't make much sense, e.g if k >= k when is a valu...

12 jours ago | 0

Answered
How to store sequence of bits as a bit stream and use the least possible memory ?
A bit similar to Matt's suggestion, but may be slightly more memory efficient since bwpack uses multiples of 32-bit, is to: spl...

12 jours ago | 0

Answered
Erase data assigned to the variables for every iteration of the FOR LOOP
First, let's fix your starting point. As I said, for what you're doing tables are the wrong storage. They're more complicated to...

12 jours ago | 0

| accepted

Answered
How to increment a v value to an i position in a vector every n iterations ?
I don't really understand your example, particularly the E which doesn't appear to have any meaning (shouldn't the A in your exa...

12 jours ago | 0

Answered
Click escape to stop my MouseDownfcn in the GUI?
Probably, the simplest thing is to disable whichever callback you don't want to execute once escape is pressed, so in the Window...

12 jours ago | 0

Answered
Extract data from multiple excel files
I would recommend you use fullfile instead of strcat to build paths. This way you don't have to worry about path separators. As...

12 jours ago | 0

| accepted

Answered
How can i calculate cmyk values from rgb in matlab?
People who use simple formulae like the one in the other answer are people who do not understand CMYK. Typically, if you want ...

12 jours ago | 2

| accepted

Answered
How to apply recursion?
Recursion is rarely an efficient coding method and I wouldn't be surprised if you hit the default recursion limit on some large ...

13 jours ago | 0

| accepted

Answered
Reading .txt file
Well, yes you can't read that as a single number. You can either store the whole lot as a vector of digit characters: digits_te...

13 jours ago | 0

| accepted

Answered
Sum calendar Duration array
Are you actually interested in getting the result as a calendarDuration as opposed to plain duration? Indeed, for some reason su...

13 jours ago | 0

| accepted

Answered
imwrite error saying 'TransparentColor' is not a recognized parameter
Yes, the documentation list 'TransparentColor' as a parameter but only for GIF images. GIF is a very limited format, completely ...

14 jours ago | 0

| accepted

Answered
Check appearance counts of multiple patters in a cell matrix
Any way to vectorize the code? Not really, you could cellfun it, but that's not vectorisation (cellfun is just a loop in disgui...

14 jours ago | 1

| accepted

Answered
finding the name which are the same in an Excell file and make structure and sub-structure form them
From your description, it really sounds like you would be better off using a table rather than splitting the data into structure...

14 jours ago | 0

| accepted

Answered
grouping array based on similar row element
The easiest: savelocation = 'C:\somewhere\somefolder'; fileformat = 'submatrices_%02d.txt'; group = findgroups(A(:, 1)); s...

14 jours ago | 0

| accepted

Answered
fwrite fread consistency issue
It's all to do with encoding. Note that the behaviour you see is going to be OS dependent and locale dependent in some ways.In a...

14 jours ago | 0

| accepted

Answered
import dll into matlab
In R2016b as per the original question, the only way to use the library would have via its python binding. See the doc for guida...

14 jours ago | 0

Answered
Is this a valid expression?
As matlab tells you is not valid, you can't have (:) on the output of a function. Since (:) is simple a reshape, tmpOffsets = ...

14 jours ago | 0

Answered
Find the index of zero in cell and put it as empty
A(cellfun(@(x) isequal(x, 0), A)) = {[]}; %replace any cell whose content is the scalar 0 by empty is one way. edit: fixed co...

15 jours ago | 0

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
Your criteria for the cluster connectivity is a bit strange in my opinion since it doesn't actually require adjacency. If that's...

15 jours ago | 0

| accepted

Answered
readtable() Giving NaN for some data files (.txt)
Certainly, it's not clear what is confusing readtable with your second file. Whatever it is it has to do with the space characte...

15 jours ago | 0

Answered
Finding columns that contains a specified string
The format of your excel file is really not ideal. Anyway, this is one way: header = readcell('Rahmani.xlsx', 'Range', '1:4'); ...

15 jours ago | 0

| accepted

Answered
how to add rows at missing times in a table?
The easiest would be to convert your table into a timetable. You could indeed use the unix time after converting it into datetim...

16 jours ago | 1

| accepted

Answered
Making cell array of cells of strings the same size by adding empty strings
maxlen = max(cellfun(@numel, yourcellarray)); newcellarray = cellfun(@(s) [s, repmat({''}, 1, maxlen - numel(s))], yourcellarra...

16 jours ago | 0

| accepted

Answered
Trying to Set Data in UITable, but getting error: Values within a cell array must be numeric, logical, or char
The error message is indeed correct. All the elements of rows 2:end of column 1, 6 and 11 of your cell array are themselves 1x1 ...

16 jours ago | 0

Answered
How to convert cell columns in a table?
Probably, data = readtable('LA-01.csv', 'Delimiter', ' ', 'MultipleDelimsAsOne', 1, 'TreatAsEmpty', 'N/A') would fix the probl...

16 jours ago | 0

Answered
Converting and Instrument Object Array (instrfind) into strings?
I don't have any serial port on this machine so can't really test for the actual property names, but it should be something like...

16 jours ago | 0

| accepted

Answered
Nonlinear regression fits on data sets in a cell array?
For the problem with the tables: Before the loop: fittables = cell(1, numel(theFiles)); %preallocate cell array to store all ...

16 jours ago | 0

Answered
Automatic legend changing based on the function
First, minor things: I would recommend you put a space (preceded by a colon maybe) at the end of your input strings so that wha...

environ un mois ago | 2

| accepted

Answered
Replace NaN with next good value in a certain column of a table
It's as simple as: T2 = fillmissing(T2, 'next', 'DataVariables', {'lat', 'lon', 'station_elevation'}) or T2 = fillmissing(T2...

environ un mois ago | 1

| accepted

Load more