Answered
Storing date and time with every meassurement
I'd probably use a timetable instead of a plain table. t = timetable(NaT(0, 1), [], 'VariableNames', "measurements"); n = date...

5 years ago | 0

| accepted

Answered
removevars ERROR for a table
How many variables does your timetable have and how many do you want to keep? If you only want to keep one or two, rather than r...

5 years ago | 1

Answered
How can I convert a matrix to string with arrayfun?
Use the repelem function.

5 years ago | 0

Answered
What is this code used for?
We can't say what it's used for in your application because you haven't told us anything about the context in which it is called...

5 years ago | 0

Answered
Implementation of Data and Sinus Curves maximum
It sounds like the islocalmax function may be of use to you.

5 years ago | 0

Answered
table function creating structs
Check that you haven't written your own table function or downloaded one that's taking precedence over the built-in table functi...

5 years ago | 0

| accepted

Answered
Select Folders with a certain date/time range
Use datetime arrays and date and time relational calculations. D = dir(fullfile(matlabroot, 'toolbox', 'matlab', 'demos')); D(...

5 years ago | 0

| accepted

Answered
divide a matrix based on the presence of a coefficient
Do you need these as separate variables or do you just need to process each group of dates separately? In the latter case, see t...

5 years ago | 0

Answered
Digraph with a single constrained axis
Are you trying to create some sort of horizontal flowchart? If so them perhaps using the 'layered' layout with the 'Direction' o...

5 years ago | 0

Answered
While Loop, with a user made function
From the documentation for the while keyword: "while expression, statements, end evaluates an expression, and repeats the execut...

5 years ago | 0

| accepted

Answered
Conversion to double from function_handle is not possible.
Non-scalar arrays of function handles are not allowed. Either make the function handle and use it without storing it for long-te...

5 years ago | 0

| accepted

Answered
Digraph node label threshold
Is there a way to change this threshold? No. Force labeling? Yes. D = digraph(sprand(150, 150, 0.1)); h = plot(D); % No lab...

5 years ago | 0

| accepted

Answered
Incremental conditions for if statement
If you want to check if a number is not in a given set, use ismember. x = 1:10; if ismember(5, x) disp("5 is in x") else...

5 years ago | 0

| accepted

Answered
MATLAB : find a way with GPU NVIDIA to inverse quickly a large matrix of symbolic variables
To elaborate on what John D'Errico said: for n = 2:6 A = sym('A', [n, n]); tic IA = inv(A); t = toc; f...

5 years ago | 0

Answered
rng function in matlab
what is porpuse of the state field? It is the state of the random number generator. For most users of rng you can ignore what t...

5 years ago | 0

Answered
Function definition using a variable from a block based on a for loop
For this I'd use one of two approaches. A=[1 2 3 4 5 6 7 8 9 10]; Att=[0 2 4 6 8 10 12 14 16 18]; % Approach 1 y = myf1(At...

5 years ago | 0

| accepted

Answered
why fprintf have a double class but sprintf have char
Because that's what they're documented to do. The documentation for the sprintf function states "str = sprintf(formatSpec,A1,.....

5 years ago | 0

| accepted

Answered
Different results for formula in Matlab and Excel
The problem is operator precedence. Here are the rules for operator precedence in Microsoft Excel and here are the rules for MAT...

5 years ago | 2

| accepted

Answered
Error: Array indices must be positive integers or logical values.
-2*zeta2(z(4)-z(2)) Is z(4)-z(2) guaranteed to be a positive integer value suitable for use as an index into the variable zeta2...

5 years ago | 0

| accepted

Answered
Call function in package from package
Everything I'm writing here is my own opinion about what would happen if we made the change requested in this discussion thread....

5 years ago | 1

Answered
unclear number of if or maybe other commands?!
So you want to discretize your data? x = rand(10, 1); binedges = 0:0.25:1; values = [1.1, 2.22, 3.333, 4.4444]; d = discreti...

5 years ago | 0

| accepted

Answered
how to create helperCropPointCloudsAndMergeLabels function?
Open the Live Script containing the example in MATLAB using the "Open Live Script" near the upper-right corner of the page in th...

5 years ago | 1

Answered
The end operator must be used within an array index expression.
In this case read is a function, not a variable. Attempting to "index" into the function with end won't work. I would probably r...

5 years ago | 2

Answered
Problem with adding integers
Set an error breakpoint and run your code. When you reach the line that throws the error, check that what you believe to be true...

5 years ago | 0

Answered
scatter plot (need matlab script)
That doesn't look like a scatter plot. It looks more like a heatmap chart. Though you are going to need to bin your data if you ...

5 years ago | 1

Answered
Create an array of empty durations
Another way to create an empty array of duration objects is to use the empty function for the class. d = duration.empty(5, 0)

5 years ago | 1

Answered
Error using round every time can anyone please help me with this?
The round function for symbolic expressions does not accept the input argument N (the number of digits to which to round) like t...

5 years ago | 0

Answered
Rounding off and approximation functions.
N = 14; x = 2.^nextpow2(N)

5 years ago | 0

| accepted

Answered
Does a site license work when offline; if so, how long before it needs to be refreshed?
One option would be to check with your IT department (or whomever maintains your licenses) to see if license borrowing is enable...

5 years ago | 0

| accepted

Answered
How to I know this file? It is a .p file.
Constantino Carlos Reyes-Aldasoro is correct. If you want to see the implementation of a P-coded file you will need to ask the a...

5 years ago | 0

Load more