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

Answered
i need to create variable name using for loop from a table
Can you define variables with numbered names like X1, X2, X3, ... ? Yes. Should you do this? Generally we recommend against it....

4 years ago | 1

Answered
Why is this coding showing that? What's the problem here?
The main problem with your line 10 is that square brackets are not used for calling functions. They are used for concatenating a...

4 years ago | 0

Answered
How to distinguish specific nodes in an undirected graph ?
Create a sample graph and define some sample load and capacity data. rng default G = graph(bucky); Load = (1000-800)*rand(num...

4 years ago | 0

| accepted

Answered
How do I get Volume Viewer functions to work?
Which release are you using? According to its documentation page orthosliceViewer and sliceViewer were introduced in release R20...

4 years ago | 0

Answered
error regarding syms symbolic mathtool
You're missing an operator between Rid and (R1+Rf). If you want to multiply those two quantities you need to explicitly specify ...

4 years ago | 0

Answered
assert() alternative to continue the test when finding an error
If you're using the unit testing infrastructure, use the verify version of the qualification API function you're using instead o...

4 years ago | 0

| accepted

Answered
Mean function returning super low ( and wrong) value for a specific variable
You can notice just by looking at the values that the real mean is nowhere close to -1.9e-17. Why can't the mean be close to 0?...

4 years ago | 1

Answered
Fixed node locations using graphplot() with Markov chains
Store the handle of the GraphPlot in a variable, h1 in the code below. adjacency1 = sprand(6, 6, 0.2); D1 = digraph(adjacency1...

4 years ago | 1

| accepted

Answered
Online Matlab is not working since past few days
Please send the code that you're running when MATLAB says it's encountered an internal problem to Technical Support and let them...

4 years ago | 0

Answered
Assigning Function Name with "for" loop
Can you define variables this way? Yes. Should you do this? The general consensus is no. See that Answers post for an explanati...

4 years ago | 0

| accepted

Answered
how to not use all input arguments in the function because some of the arguments are fixed?
You can use an anonymous function "adapter". f = @(in1, in2) max(in1, in2); % I could have used @max ...

4 years ago | 0

Answered
Matlab - debugging Fmincon
Are the points provided to your function exactly the same as the initial guess or do they differ by a very small amount, small e...

4 years ago | 0

Answered
Question about Use property validation
You can use a colon in the size validation section of the property definition (see Property Size Validation on this documentatio...

4 years ago | 0

Answered
using cosh and inverse cosh in matlab
What problem? A1 = 5+5i A2 = acosh(cosh(A1)) (A2-A1)/(2i*pi) Remember that as stated on Wikipedia "hyperbolic functions are ...

4 years ago | 0

| accepted

Answered
Solving algebraic equations without using symbolic variables
For one equation in one unknown, use fzero. y = 1; f = @(x) x + y; initialGuess = 42; % Find a zero of f(x) - 2 = 0 which ...

4 years ago | 0

| accepted

Answered
create intervals of equal length but sequential
So into which interval should a value of exactly 90 fall? Interval 1, interval 2, or both? I think that depending on what opera...

4 years ago | 0

Answered
adding constaints to fmincon code
See the description of the lb and ub input arguments and the "Minimize with Bound Constraints" example on the documentation page...

4 years ago | 1

| accepted

Load more