Answered
A test driven development method to validate bellman-ford algorithm works
Are you familiar with the testing frameworks included in MATLAB? Can you think of test cases with which to try to break your co...

4 years ago | 0

Answered
Create a histogram of data that is already "bincounts"
Addressing just the question of plotting a histogram given bin counts and bin edges rather than the raw data, you can do this by...

4 years ago | 0

Answered
Find the mean of all variables in a table that contain a specific "word" in a defined variable
Use a string processing function like startsWith, contains, or matches to identify those rows in your table that have Left in it...

4 years ago | 1

Answered
How do i set class members by calling its own methods?
By default, classes in MATLAB are value classes. See this documentation page for a discussion of the differences between value c...

4 years ago | 0

Answered
Why isn't my max iterations increasing?
You're not passing the options you set using optimoptions into fsolve. The optimoptions function doesn't change some "global opt...

4 years ago | 0

Answered
Is there any mathematical method of curve fitting for cases when the modeling function is unknown (another degree of freedom for the form of the function)?
Here's a set of points. Can you tell me the equation I'm thinking of that generated this data? x = 1:6; y = zeros(1, 6); No, ...

4 years ago | 1

Answered
How can i convert binary number to galois field integer number ??
Use the Galois field functionality in Communications Toolbox.

4 years ago | 0

Answered
Getting NaN greater values in a function
What is the factorial of 1000 in double precision? factorial(1000) It overflows. If we computed it symbolically, using arbitra...

4 years ago | 0

Answered
How to check if a generated number is between 2 values
Other options that may be able to do what you want include discretize and interp1. x = rand(5, 1) p = 0:10:100; y1 = discreti...

4 years ago | 0

Answered
Need to change Value in a new object but told "read only"
The documentation page to which you linked is for an object in Bioinformatics Toolbox and so isn't really applicable for the uav...

4 years ago | 0

| accepted

Answered
How to evaluate numeric expression in a string, which contains "12u" (for 12e-6) and "0.1m" (for 0.1e-3) formated numbers (standing for micro and milli)?
I'd like to have a "supercharged" eval function This doesn't sound like a good idea. which would accept expressions where numb...

4 years ago | 0

Answered
How do I find a substring within two different strings at once?
If you're using string arrays, we recommend using a string array and not a cell array containing string arrays. If you do, you c...

4 years ago | 0

| accepted

Answered
When I try to use the function 'magic(n)', Matlab says that the execution of the script magic is not supported
Rename the magic.m file that you've created in the /Users/helloooo/Documents/MATLAB folder. It's preventing MATLAB from accessin...

4 years ago | 1

Answered
how to delete certain columns and rows from matrix
Do you know which rows/columns you want to delete or which ones you want to keep? If to keep: M = magic(4) toKeep = [2 4]; A ...

4 years ago | 0

Answered
What is replacement for instrfind function?
The Compatibility Considerations section of the instrfind function documentation page gives a list of replacement functions for ...

4 years ago | 0

Answered
How to add more parameters to callback function.
I know the cell array approach @Adam Danz suggested for passing additional parameters into a callback function works for callbac...

4 years ago | 0

Answered
Can you use the whos command to identify classes
For the integer types see this documentation page.

4 years ago | 0

Answered
can not activate MATLAB in new computer
See this Answer if you still have access to the old machine or this Answer if you no longer have access to the old machine.

4 years ago | 0

Answered
I get "vectors must be the same length". How come?
If you want the value of C1 to be a constant 15 for all the values of x1, you need to explicitly expand C1 to be a vector of tha...

4 years ago | 0

Answered
Cronometer comparation for rally
I wouldn't use datetime here. Since your times are in units of seconds I'd probably store that data as a duration array instead....

4 years ago | 0

Answered
How to filter table rows according different conditions?
You can do this using ismember or (depending on your conditions) some of the string processing functions like matches, contains,...

4 years ago | 1

| accepted

Answered
MATLAB 2022b installation corruption
After rebooting my PC, the entire account was reverted to Windows start-up, like the day Windows was installed. That obviously ...

4 years ago | 0

Answered
Can someone help with error "index exceeds number of array elements"? I attached image as to what it needs to look like..
The root cause of the problem is that the variables top and integration aren't the sizes you think they are. You may think the l...

4 years ago | 0

Answered
isbetween function not working with any 'intervalType'
From the Release Notes it appears the ability to specify an interval type was introduced in release R2021b.

4 years ago | 0

| accepted

Answered
How do I fix this "Array indices must be positive integers or logical values error?"
I have comments on a couple of lines in your code. % Diodecurv.m % Diode exponential curve matching and plotting % % Plots m...

4 years ago | 0

Answered
How to create a for loop with a set of variables
Can you dynamically create variables with numbered names like h1, h2, h3, etc. and refer to those variables dynamically in code?...

4 years ago | 0

Answered
fail to convert datetime with pm string
s = '2022-09-30 16-01'; In the InputFormat option for the datetime function, 'hh' refers to "Hour, 12-hour clock notation using...

4 years ago | 0

| accepted

Answered
Create subclass but doesn't need 1 superclass property
Ignore the fact that the superclass has the property by not using it in any of the subclass methods. Split the superclass into ...

4 years ago | 0

Answered
Issue with moving from hist() to histogram(). Different values?
As stated on this documentation page the hist function operates with bin centers while histogram operates with bin edges. If you...

4 years ago | 0

Answered
X axis tick labels
The function for setting the X ticks on an axes is xticks not xtick. It is not a method of the axes object so you need to call i...

4 years ago | 0

Load more