Answered
datetime() does not return time data
In the Preferences, expand the MATLAB item in the tree. Select the Command Window item. What does it list for the default dateti...

3 years ago | 0

| accepted

Answered
How to convert datetime to datestr including day of year
Looking at the table of format identifiers in the description of the Format property of datetime objects on the datetime documen...

3 years ago | 0

| accepted

Answered
Questions about infinity in matlab
In matlab it seems that as long as a number is greater than 1e309 it will be considered inf, Not just in MATLAB. This is standa...

3 years ago | 2

Answered
will lasFileWriter become available for Compiler in the future?
In general we do not comment on future plans. If you would like MathWorks to add support for lasFileWriter in MATLAB Compiler in...

3 years ago | 0

| accepted

Answered
convert Matlab results to Latex
You could publish your code.

3 years ago | 0

Answered
cant find model linearization under apps, even although control system toolbox is downloaded
Are you talking about this App that is part of Simulink Control Design? Check the output of ver to determine if you have this pr...

3 years ago | 0

| accepted

Answered
repeat each entry of a vector 100 times
Use the repelem function.

3 years ago | 0

Answered
Calling function in fminsearch
If you mean you want to call fminsearch repeatedly with different initial points, call it in a loop. f = @sin; initialPoints =...

3 years ago | 0

| accepted

Answered
How to calculate daily mean from hourly data
If you have your data stored in a timetable array I recommend using the retime function to change the time basis of your data fr...

3 years ago | 0

Answered
Increase size of workspace for real-time simulation
Check the Model Configuration parameters for your model, specifically the Additional Parameters under Data Import and Export. Do...

3 years ago | 0

Answered
I keep getting "Array indices must be positive integers or logical values". error
There is no element 0 in an array in MATLAB. The first element is element number 1. You will need to change the line of code tha...

3 years ago | 0

Answered
matlab seems to be inserting line feeds in my typed commands.
Are you running MATLAB with the -nodesktop option on Windows? Are you using either the un-updated release R2022a or Update 1 or ...

3 years ago | 1

Answered
Why is my toolbox on path when I open Matlab but not in the default path after restoredefaultpath ?
What can I do when packaging the toolbox so that it is forced in the default path ? I don't believe you can. restoredefaultpat...

3 years ago | 0

| accepted

Answered
MATLAB Arrays have incompatible sizes for this operation
Ts = 0.001; fs= 1/Ts ;% Resolution of simulation To = 0.5; % period of a QAM symbol t = 0:Ts:To-Ts; N = length(t); ...

3 years ago | 0

Answered
how do I count the upper and lowercase letters in a string
I'd probably just use isstrprop, but another possibility: s = 'Abracadabra, Hocus Pocus!'; uppercaseLettersAndNonletters = s =...

3 years ago | 0

Answered
Want to buy toolboxes for an older version of Matlab without renewing the license
Please contact the Sales department directly using this link for an answer to this pricing / licensing question. [SL: Updated i...

3 years ago | 1

Answered
How to create a tree diagram with indexes which are related to each other in a matrix?
Turn your connection matrix into a graph object then use shortestpath or allpaths on that graph.

3 years ago | 0

| accepted

Answered
compact way to plot "duration" elements, with different colors
a = duration({ ... '00:01:10' '00:01:35' '00:01:09' '00:04:40' '01:32:36' '00:01:16' '00:01:38' ...

3 years ago | 0

| accepted

Answered
for loop, in irregular numbers clusters?
v = [1 2 3 4 6 7 8 10 12 13 14 15 16 18 19 20]; for k = v disp("Now serving order #" + k) end

3 years ago | 0

Answered
Not enough input arguments for my ode15s solver
Your code attempts to call your prime function with 1 output and 0 inputs and use whatever it returns as the first input to ode1...

3 years ago | 0

| accepted

Answered
Find the minimum sum of errors for every permutation
Take a look at the matchpairs function.

3 years ago | 0

| accepted

Answered
The Power Electronics Simulation Onramp is missing from the Simulink Start Page.
According to the documentation page this Onramp was introduced in release R2022b. This Answers post is tagged with release R2022...

3 years ago | 0

| accepted

Answered
Assign a line in every element of a 3d matrix
If we look at the array you posted, what I think you want would involve the first row of page 1 of val having 10 elements and ro...

3 years ago | 0

Answered
From User Input to File Name
With the clarification in your comment on the answer from @Enrico Gambini, I would use string operations along with the fullfile...

3 years ago | 0

| accepted

Answered
What is the essential difference between matlab's new built-in data type dictionary and the old containers.Map?
The Release Notes state as one benefit "In almost all use cases, dictionary performs faster than containers.Map." You may als...

3 years ago | 0

| accepted

Answered
How to insert a string to a variable name
Should you try to create variables with dynamic names like this? The general consensus is no. That Answers post explains why thi...

3 years ago | 0

Answered
Reading a Graph Object from a Text File
For each line of the text file, use addedge to add an edge between the first state whose abbreviation appears on the line and ea...

3 years ago | 2

| accepted

Answered
Forgot pin for MATLAB R2022b installation
Are you using your company or school's license or are you using a license you purchased yourself? If the former, check with your...

3 years ago | 0

Answered
GUIDE handles not created automatically
When opening the .fig file directly, the layout is correct, but whenever I try to interact with it, I get that dot indexing erro...

3 years ago | 1

Answered
Hi! How can I create a conditional statement from checking if an array is empty? I will paste my non-working code here.
You don't actually have to convert the logical value into double and compare it to 1. From the documentation for the if keyword:...

3 years ago | 1

Load more