Community Profile

# Gabor

Last seen: 1 year ago Active since 2019

#### Content Feed

View by

Question

Strange error: "Unable to use a value of type table as an index."
Hello, When I used the word sortrows in the function input: myfunc_results=myfunction(T, sortrows); I get error: "Unable...

1 year ago | 0 answers | 0

### 0

How to make dynamic variable names (A1, A2, ..., An) with "for" loop? Using "eval" "num2str"?
T=table; Date=datetime(2014,12,31); eval(['Dynamic_var_name_' datestr(Date,'mm_dd_yyyy') '=T;']); This is how you name dyna...

1 year ago | 2

creating a dynamic variable name based on cell array
T=table; Date=datetime(2014,12,31); eval(['Dynamic_var_name_' datestr(Date,'mm_dd_yyyy') '=T;']); This is how you name dyna...

1 year ago | 0

How to truncate all the decimal places??
fix(1.12) -> remove decimals -> result: 1 fix(23.858457) -> remove decimals -> result: 23 For datetime...

1 year ago | 0

Convert Logical into Sequential Index Vector
Hi, What if we want to do the exact opposite? We have y = [2 5 6 7] and we want to create x = [0 1 0 0 1 1 1] without loop? x...

1 year ago | 1

problem to concatenate table due to "cell and non cell" error
I would add to check the missmatching table variables by comparing them by for eg.: class(Table1.Column_name(1)) class(Table2....

1 year ago | 0

Trouble concatenating two tables
I would add to check the missmatching table variables by comparing them by for eg.: class(Table1.Column_name(1)) class(Table2....

1 year ago | 0

command unique without sorting??
In my opinion unique should be "stable" by default. If someone wants to sort, than there is sort commant that for. What does sor...

2 years ago | 0

Question

Vectorizing Table in Structure without Loop
Hi, I created this short code to explain my question: for i=1:10 dynamic_field_name=string(cell_w_strings(i, 1)); ...

2 years ago | 1 answer | 0

### 1

Replace NaN's in table with zero
T{:,2:4}(ismissing(T{:,2:4})) = 0; 2:4 are the columns which are containing NaN values.

2 years ago | 0

Logical indexing: Find row in table by text in column
b = [1,2 ; 3,4]; q = array2table(b); r = q(b1 == 3, :); Unrecognized function or variable 'b1'.

2 years ago | 0

How to convert string to variable name ?
Your answer does not work if you only have hammer and a screw available at hand (curvfitting tool does not accept structs as var...

2 years ago | 4

Find elements in table without looping (Matlab)
rows = T.id=='DHK'; T(rows, :)

4 years ago | 3

How to create a table name using a string variable?
Thank you all

4 years ago | 0

How to create a table name using a string variable?
I guess I will just use a cell which I will be store the the variable for the "name that should be" and the table itself too... ...

4 years ago | 1

| accepted

Question

How to create a table name using a string variable?
Hi, How can I use a string variable for a table name? eg.: ----------------------------- T = 'ThisShouldBeMyTableName'; Var...

4 years ago | 3 answers | 0