Answered
Loop through anonymous function
As written the body of your anonymous function is completely independent of X1 and z. I suspect that vector and/or vector1 are ...

4 years ago | 0

Answered
Why do I get the error saying I did not assign values to a call? I did assign my values after getting them from a function though? Anyone able to help me out and explain?
You've defined your atmos function to return the value of its local variable P as the second output. What value should be retur...

4 years ago | 0

| accepted

Answered
How do I stop the code and get the results?
If you're out of time and need to get the results that have been computed, under certain circumstances (the main ones being the ...

4 years ago | 1

Answered
Create new variable from an existing variable but deleting some outliers
Remove all rows in the table that have an outlier value for the oxy variable. Here's a similar example using the sample patients...

4 years ago | 1

Answered
Query logarithmic axis properties
h = semilogx(1:10, 1:10); ax = ancestor(h, 'axes') Now query or change the properties of the axes whose handle is ax.

4 years ago | 0

Answered
Can't find show() function
Can you confirm that your planner variable is a plannerHybridAStar object? What does this code display? isa(planner, 'plannerHy...

4 years ago | 0

Answered
Finding out the size of x (so how many xi we have) in a function handle
If you're doing this so you can dynamically generate the body of f that computes the sum of the squares of the elements of the i...

4 years ago | 1

Answered
Converting Numeric Dates in Matlab does not work
Another way to do this is to convery the serial date number to a datetime using the 'ConvertFrom' name-value pair argument. x =...

4 years ago | 1

Answered
find mode of an array but if there is no mode then return a random number
Use the third output from a call to mode. If that third output is not a cell containing a scalar the mode is not unique and ther...

4 years ago | 1

| accepted

Answered
Does the execution of addpath/rmpath/savepath in one workspace affect other workspaces?
IMO the only test that probably should be calling savepath is the test for the savepath function itself. You shouldn't be writin...

4 years ago | 3

Answered
I need a function to go to a table in the workspace and return a table with specfic values from a specfic colmun.
Don't pass the name of the table into your function and ask it to go searching in its caller's workspace for it. Pass the table ...

4 years ago | 1

| accepted

Answered
What is sigma function?
From Wikipedia: "In general mathematics, uppercase Σ is used as an operator for summation." In MATLAB see the sum function. I'm...

4 years ago | 0

Answered
Loop to get mean and max of multiple variable arrays
Can you define variables with numbered names like car1, car2, car3, ... ? Yes. Should you do this? Generally we recommend again...

4 years ago | 0

Answered
Implementing ellipsis, also known as dot dot dot or "..." for line continuation in a regular expression statement
Instead of trying to split a long char vector across multiple lines, why not write your regular expression as a series of string...

4 years ago | 0

| accepted

Answered
Undefined function 'abc' for input arguments of type 'double'.
The way you've defined your method, one or both of the inputs obj and n to your method must be an instance of the class. You're ...

4 years ago | 0

Answered
Is there a way to search for function calls recursively without running the program?
Static analysis can only get you so far. What function gets called by these two lines of code (omitting the block comment lines)...

4 years ago | 1

Answered
duration to number(double)
Use seconds, hours, etc. depending on how you want the duration array to be converted to a number. d = duration(1, 2, 3) s = s...

4 years ago | 3

| accepted

Answered
Finding all possible combinations of objects
Implement one or more of the algorithms given on the Wikipedia page abour the knapsack problem.

4 years ago | 0

Answered
why addpath is not working
You cannot add class directories (whose names start with @) to the MATLAB path. The classes in those directories will be accessi...

4 years ago | 0

| accepted

Answered
I have two charges on my card. $55.00
Please contact Customer Service directly for assistance. [If you're asking why I don't help you directly I can't since I don't h...

4 years ago | 0

| accepted

Answered
What compiler and processor architecture does AMTLAB use?
The list of supported and compatible compilers for the current release is on this page.

4 years ago | 0

Answered
How to select a character array if it has a specific end value
See the split and contains functions.

4 years ago | 1

| accepted

Answered
Legend Title Indexing - Keeps Overwriting
Another way to do this is to let each line know what should be added to the legend when you create the line. When you call plot...

4 years ago | 0

Answered
cannot find dicomfind in the R2021a with IP Tbx 11.3
The documentation page for the dicomfind function states that it was "Introduced in R2021b". [Look at the bottom of the page.] Y...

4 years ago | 0

Answered
Why does pagemldivide not give Singular Matrix warnings?
Please send all questions or feedback about a Prerelease release to Technical Support rather than posting to MATLAB Answers.

4 years ago | 0

Answered
Class returns wrong type for patch return variable assigned to an array within a class
As you've written your code, the patchs property stores a double array. You're in case Prop1 as described in the Property Defaul...

4 years ago | 0

Answered
Why aren't weight values incorporated into graph and digraph?
You can have the edge weights influence the layout of the graph or digraph but it is possible to specify edge weights such that ...

4 years ago | 0

| accepted

Answered
What's the best way to prevent a class from being instantiated?
Make it Abstract. classdef (Abstract) purelyStatic methods(Static) function y = getPi() y = pi; ...

4 years ago | 0

| accepted

Answered
Struggle with logical indexing
You're not actually using logical indexing, you're using subscripted indexing. If you omitted the find call where you defined c ...

4 years ago | 0

Answered
Add function argument validation for optional parameters based on the values of required parameters
Write your own local function that accepts n_bar, a, and b and performs the validation and use that local function as your valid...

4 years ago | 0

| accepted

Load more