Answered
Importing histogram count and bin values into a matlab histogram object
I'm analyzing timestamps from a single photon detector. I populate the bins as I go. In 1 second of data collection, I have near...

6 years ago | 0

Answered
How to extract the function from curve fitting tool in Matlab
You can call integrate on the cfit object. See the documentation page for more information.

6 years ago | 0

| accepted

Answered
How to convert data points to time
Make a datetime or duration array and call plot with that as the first data input. v = 1:10; x = datetime('today')+days(v); y...

6 years ago | 0

| accepted

Answered
How to multiply symbolic with numeric?
Call vpa on the result.

6 years ago | 0

| accepted

Answered
Customizing Figures Comprehensive Documentation
Have you read through all the pages in the Graphics category in the documentation?

6 years ago | 0

Answered
How to generate timetable with microsecond accuracy
dt = datetime('now') dt.Format = dt.Format + ".SSSSSS"

6 years ago | 0

Answered
Correct month values for x-axis
If you have date and time data stored as a datetime array just call plot. x = datetime(2020, 1:12, 1); y = (1:12).^2; h = plo...

6 years ago | 0

Answered
How to check the algorithm of the internal functions?
computeDFT is a private function in the same directory as the stft.m file. As such it is intended only be called by code in that...

6 years ago | 0

| accepted

Answered
How can i write this primitive function ?
f= @(x)x^N;%function F=@(x)(x^((N)+1))/((N)+1);% Primitive function Either define N before these two lines or define f and F t...

6 years ago | 0

Answered
Problem when Indexing large integer arrays
If you call flip, fliplr, or flipud as appropriate you don't need to do the indexing yourself. But since this is almost certain...

6 years ago | 0

Answered
Unrecognized function or variable 'addContour'. Why does Matlab not recognize this new function?
According to the documentation page the first input argument to addContour must be a dicomContours object. Is it? Even if you're...

6 years ago | 0

Answered
Generate N random number from weighted groups
groupProbs = [0.3 0.7]; groupVal = rand(10, 1); whichGroup = groupVal <= groupProbs(1); % for more groups, use discretize res...

6 years ago | 0

Answered
I want to make a full string from all the "a" values that i get
reversedDNA = 'TACATGA' DNA = replace(reversedDNA, {'T', 'A', 'C', 'G'}, {'A', 'T', 'G', 'C'})

6 years ago | 0

Answered
Some mistakes about applying sym.My matlab version is R2018b
The error message is correct. In earlier releases you could convert an arbitrary expression into a symbolic expression by passin...

6 years ago | 0

Answered
"There is no MarkerSize property on the Point class"
The online documentation is for the most recent release, currently release R2020b. According to the Release Notes the MarkerSize...

6 years ago | 0

Answered
Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
Variable names in MATLAB are not allowed to contain the - character. Nor are they allowed to start with a digit. See the documen...

6 years ago | 0

| accepted

Answered
Is it possible to have 2 indices in the same for loop?
If you want to have one for loop iterate over two variables simultaneously, you can't do this directly but you may be able to in...

6 years ago | 1

Answered
Undefined function 'mtimes' for input arguments of type 'function_handle'.
You cannot multiply a number and a function handle or two function handles. You can multiply a number and the result of evaluat...

6 years ago | 0

Answered
random numbers in Matlab 2009
The rng function was introduced in release R2011a to make it easier to control the pseudorandom number generators used by rand, ...

6 years ago | 1

Answered
Error using Reshape Function
Assign the final 17 elements of Force_signal to a separate variable. reshape the first 29233 (=943*31) elements of Force_signal ...

6 years ago | 1

| accepted

Answered
R2021 pre-release Class Diagram Viewer
Please send all questions related to Prerelease versions of the software to Technical Support using the Contact Support link in ...

6 years ago | 0

| accepted

Answered
How to set a moving window
Use the value of the for loop variable as the index of the first element in the window. Add a quantity to get the index of the l...

6 years ago | 0

Answered
replace values in an array with certain numbers
x = 2*rand(10, 1); edges = 0:2; d = discretize(x, edges, [500, 1000]); results = table(x, d, 'VariableNames', ["Raw data", "D...

6 years ago | 1

Answered
Importdata does not work anymore in r2018b
The obvious questions are: Do the files have the same names as they did before? Are the files in the same directory as they we...

6 years ago | 0

Answered
Read binary data as three UBYTE (8-bit Unsigned Byte) in MATLAB and use bit shift operators to get two 12 bit streams
Use the bit-wise operations. You're also going to need to convert between data types. x = int8(5) y = int16(x) You may need o...

6 years ago | 0

| accepted

Answered
Summing Datenum resets after 24 hours
Serial date numbers are not the right tool for this job. You want to use a duration array. dur1 = duration(12, 23, 45) dur2 = ...

6 years ago | 0

Answered
Looping over a parameter of a function used in ode45
So you want to pass i (BTW I would use different variable names than i and j, as they already have meanings in MATLAB: see doc i...

6 years ago | 0

Answered
How to input a string of integers and hex values together as an input. [9,0xa,0xb]
If you're using release R2019b or later this should work. This confirms it works in release R2020b. Array = [0,1,2,3,4,5,6,7,8,...

6 years ago | 0

Answered
Error in syms x
Line 10 of the syms.m function included in Symbolic Math Toolbox is a comment line inside the help text for that function. Line ...

6 years ago | 0

Answered
HOW TO INSERT THE DATE (DATETIME) IN THE TITLE?
peaks title("It is currently " + string(datetime('now')))

6 years ago | 3

Load more