Community Profile Gabor

Last seen: 3 månader ago Active since 2019

Statistics

• • • 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...

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...

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...

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

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...

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....

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....

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...

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)); ...

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.

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'.

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...

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

nästan 3 år ago | 2

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

nästan 3 år ago | 0

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...

nästan 3 år ago | 3 answers | 0