Answered
Cross section of a plot (surface, Imagesc) using an arbitrary line
Others have spoken about the mathematics behind taking coordinate data of your math and generating the Z data. If you're having ...

12 days ago | 0

Answered
How to save output results for loop iterations
Rather than converting from a table to an array to perform your operations, I think what you want to do is to discretize the 9th...

13 days ago | 0

Answered
why do i get 'support for 'nargin' in a script has been removed?
Script files aren't allowed to have input or output arguments. Therefore it doesn't make sense to ask how many inputs or outputs...

13 days ago | 0

Answered
How can I define a function handle with 50 very similar functions?
You can't use a for loop in an anonymous function, but the good news is you don't need to. The diff function returns the differe...

14 days ago | 0

Answered
Who have visibility graph algorithm (Matlab code)? I'm looking for the code but have not found it.
If you're trying to solve this problem where your data is elevation data and you have Mapping Toolbox available see this documen...

14 days ago | 0

Answered
How do I create a random number generator using congruent method
If this is not for a homework assignment, either use one of the existing random number generators in MATLAB (as listed on this d...

14 days ago | 0

Answered
Problem with the use of strrep command
That is correct, when called with a cell array with some char vectors in the cells as input strrep requires each element of that...

15 days ago | 4

Answered
Error in interp1 (line 186) F = griddedInterpolant(X,V,method);
although the angles of attack are sorted Have you confirmed that this is true or are you just assuming that this is true? Call...

15 days ago | 0

| accepted

Answered
Problems running the code in Mac
Indexing into a char array using {} is not supported on any platform. a = 'abracadabra' a(5) % 'c' a{5} % error Perhaps your...

15 days ago | 0

Answered
Undefined function 'geomean' for input arguments of type 'double' in Matlab 2020
The geomean function is part of Statistics and Machine Learning Toolbox. Do you have this toolbox installed and licensed? You ca...

17 days ago | 1

| accepted

Answered
unable to run the program becuase of matrix multiplication error, also need to add a 3d earth around which the plot of orbit displayed.
Get rid of these lines from your script. If you need to clear the Command Window, close all figures, or clear all variables and ...

17 days ago | 0

Answered
Looking for packages available for multiple imputation (for missing data) in Matlab
Does the fillmissing function provide the method or methods you want to use to fill the missing values in your data sets? If not...

17 days ago | 0

Answered
Why are some functions listed as not compatible with MATLAB Compiler, when they are in fact used and compilable in the Simulink Standard Library?
Some functions and functionality is supported with MATLAB Compiler but not Simulink Compiler. Some functions and functionality ...

18 days ago | 1

| accepted

Answered
The code works but it gives this warning. How to remove this warning?
Looking at the contents of the attached L2_Array1.m: textOfFile = readlines('https://www.mathworks.com/matlabcentral/answers/up...

18 days ago | 1

| accepted

Answered
find the closest datetime
Let's make some sample dates and times within two-ish days of right now. n = 10; rightNow = datetime('now') A = rightNow + ho...

19 days ago | 0

Answered
Matlab HDL coder error: reptmat is not supported, but in the documentation it is.
There are different implementations of repmat for numeric arrays (the documentation to which you linked) and for fi arrays. Note...

19 days ago | 0

Answered
matlab -batch jobs are killed on Ubuntu without trace of reason
Are your jobs consuming a lot of memory? I'd check the syslog file to determine if the Out of Memory killer killed MATLAB to try...

19 days ago | 0

Answered
How can I plot my solutions in my phase portait?
You may be interested in specifying the OutputFcn option in your ODE solver call. The odephas2 function included in MATLAB may d...

20 days ago | 0

Answered
The MATLAB function to solve implicit equation
@John D'Errico posted how to solve this equation symbolically, if you don't have values for the various symbols used in the code...

20 days ago | 0

| accepted

Answered
Array not compatible error
For these types of errors, where data isn't the size you expected it to be, I'd use error breakpoints. Set an error breakpoint u...

20 days ago | 0

Answered
How do I pass input arguments to a compiled executable and define the output arguments that the user can see?
See this documentation page. Defining input arguments is relatively straightforward. For output arguments see the "Using a MATLA...

21 days ago | 0

| accepted

Answered
For the very same code memory is not released after a "clear" on Ubuntu but is on Windows
I suspect that the Out of Memory Killer is what killed MATLAB on your Ubuntu machine. See this webpage for more information and ...

21 days ago | 0

Answered
How to run the 'matlab -batch ...' with a different Matlab version
Try launching the MATLAB executable directly in bin rather than the one in the $ARCH subdirectory under bin. "D:\Matlab\R2021b\...

21 days ago | 3

| accepted

Answered
access matlab figures by opening them with a mouse while a matlab terminal application is still running
Because the program is running, after the user uses one of the menu options to make some plots that now exist in the working dir...

22 days ago | 0

Answered
How to do multiple divisions in order to generate another array?
All but two of your lines follow a pattern. I've commented the relevant lines out here so I can run code later in my answer. %{...

22 days ago | 0

Answered
Assign a row vector to a row of an array using logical indexing to omit certain values
In many places in MATLAB, the values 0 and false can be used interchangeably. x1 = 5+0 x2 = 5+false Indexing is one of the ex...

22 days ago | 0

Answered
comparision of data with logic given as input
Can you dynamically create and operate on variables with numbered names like T1, T2, T3, etc.? Yes. Should you do this? The gen...

22 days ago | 0

Answered
I keep getting a "convenc" error. Line 88. Could be "varargin" missing argument? Not sure.
If you're calling the convenc function from Communications Toolbox, the section of that documentation page that describes the ms...

22 days ago | 0

Answered
How to access external variables in other workspace? (fmincon function)
Don't use global variables. Parameterize your nonlinear constraint function instead. If you define your constraint function as: ...

22 days ago | 0

Answered
Trend lines with moving average
My first thought would be to try using the Remove Trends Live Editor Task or the trenddecomp function.

23 days ago | 0

Load more