Answered
ctrl+d does not work for methods
The problem is simple to state but quite a bit more complicated than you might expect. If you were to highlight the method name ...

3 years ago | 1

Answered
Error calculating mean when variable inputs are decimals between 0 and 1
The first input to the mean function is the data whose mean you want to compute. The second input, if it is numeric, is the dime...

3 years ago | 1

| accepted

Answered
How to solve the error while solving the given equation by ode45 or ode15s?
There are several problems with this code. clear all; clc; These two lines are unnecessary. Often people put them in because ...

3 years ago | 0

Answered
x=max(M,[ ],2). Iam not understanding this part of the code.
See the section of the documentation page for the max function that describes the dim input argument. The two pictures there sho...

3 years ago | 0

| accepted

Answered
Removing characters from a datetime format to make it recognizable to MATLAB
You can include literal characters in the InputFormat argument of a call to datetime. See the "Date and Time from Text with Lite...

3 years ago | 1

Answered
How to evenly space the y-axis from 1 to 10^-3?
Do you want a logarithmic Y axis? If so use semilogy or loglog (if you want both axes in log scale) instead of plot. Alternately...

3 years ago | 1

Answered
How to fix equation code error
nu = 1.5e-5; ya = 9.7; k = 0.41; y = 2.3025e-03; uT = (k.*rho.*nu).*((y.*ustar/nu) - ya.*tanh(y.*ustar/nu.*ya)) Nowhere ...

3 years ago | 0

Answered
Creating the MATLAB Logo - Updated
How does what you want differ from the figure created by the logo function? logo

3 years ago | 0

Answered
Why in trial version R2023a, ''pigxs'' commands do not pop-up window?
Like @Cris LaPierre I don't see any function named pgixs. I don't see a function named pigxs (as per your comment after the pict...

3 years ago | 0

Answered
extrapolating the data out of the given range
Let's look at your data. You had a typo in the last element of mulasecc_result so I replaced the period with a comma. num_injec...

3 years ago | 0

Answered
I want to convert from milliseconds to a date using excell 1904 format
baseDate = datetime(0, 'ConvertFrom', 'excel1904') d = baseDate + milliseconds(1e6) or d2 = datetime(1e6, 'ConvertFrom', 'epo...

3 years ago | 0

Answered
Having trouble finding a row in a table
You need to extract the contents of the table variable if you want to use == on it in the release you're using. load patients ...

3 years ago | 0

Answered
Run a function with both input and variable
pmin = 0; pmax = pi/2; al = [-0.1211 -0.2005 0.1527 0.7276 0.5885 0.2645 0.6400]; fun = @(p)2.*al.*p.*sin(p).*cos(p); % the f...

3 years ago | 1

Answered
Expanding compiled app functionality by external p-files
From the documentation: "MATLAB Runtime only works on MATLAB code that was encrypted when the deployable archive was built. Any ...

3 years ago | 0

Answered
Plotting x-axis time in dd hh mm ss format
Based on the clarifications you posted on the answer by @Bora Eryilmaz I think you want to plot a duration array rather than a d...

3 years ago | 1

Answered
Problem with a Loop
Instead of reading the data into a matrix, creating individual variables, and then storing those variables in a struct array I'd...

3 years ago | 0

Answered
Construct a histogram manually and calculate the average of data contained in each bin
Use discretize to identify which data points fall into each bin then groupsummary to take the mean of the data in each bin?

3 years ago | 0

Answered
number of significant digits for the coefficients in curve fitter (polynomial, with two degree)
Don't confuse what's displayed by the fit object and what's stored in the fit object. Perform the fitting, export the fit to the...

3 years ago | 2

Answered
Parallel Matlab on EC2 or other supercomputer?
The "Resources for Using MATLAB and Simulink in the Cloud" page links to instructions about how to run MATLAB on a virtual machi...

3 years ago | 0

Answered
Is there a function like movsum which simply gets the values in a given sliding window rather than summing them?
Let's use some starting data that's a little more varied than 1:10. x = [1 2 3 4 5 6 7 8 9 10].^2 Define the window length. w...

3 years ago | 0

| accepted

Answered
How to subcategorize dates from a datetime table?
If you have a timetable use a timerange to index into it to retrieve the appropriate section of the timetable then perform whate...

3 years ago | 1

| accepted

Answered
Code for a project, giving me an error stating unrecognized function or variable 'mass'. What is the fix?
So your function accepts seven input arguments from the user: function design_parameters = size_auv_design(mass, length, width,...

3 years ago | 0

Answered
Calling a function file in a method
If location.m is a function file and the function you want to call is the first function in the file, the main function, just ca...

3 years ago | 0

| accepted

Answered
using imread on script get not valid name error, but no errors on command window
What's the name of your script? Does it satisfy the rules listed in that dialog? Does it start with a letter and contain only l...

3 years ago | 0

| accepted

Answered
How do I multiply a given function handle with the independent variable?
f = @sin; g = @(t) t.*f(t); format longg [3*sin(3); g(3)] % Spot check by evaluating the function at t = 3 Now you can use g...

3 years ago | 0

| accepted

Answered
UNABLE TO PERFORM THE ASSIGNMENT
The problem is not with the solve call. The problem is on the next line. You're assuming that the equation you're solving has ex...

3 years ago | 0

Answered
source of helperCreateBinaryOccupancyMap in Collision Warning Using 2-D Lidar
That local function is defined in the Supporting Files section of the example.

3 years ago | 0

| accepted

Answered
Find element in heterogeneous object array
Something like this should work. child1 = SubClasse1; child2 = SubClasse2; vectorOfObjects = [child1 child2] isClass1 = arra...

3 years ago | 0

| accepted

Answered
How to implement the following algorithm in MATLAB ?
See the shortestpath and/or shortestpathtree functions for graph objects.

3 years ago | 0

Answered
Transformation from datetime to seconds
How do you want to perform this transformation? What does right now translate to in seconds? N = datetime('now') Do you want t...

3 years ago | 0

Load more