Answered
Algorith doesnt work in program code for Thomas algorithm
If this is a homework assignment, I'm guessing there may be at least one or two examples in your textbook where they walk throug...

4 years ago | 0

Answered
Combine data from 3 tables based on common datetime?
Are you storing your data as table arrays or as timetable arrays? If the former, consider converting the table arrays to timetab...

4 years ago | 0

Answered
How to delete all rows of a matrix wherever any value is invalid (999)?
Let's make a sample matrix M with some 999 values present in columns 1 and 4. I'll also make a backup copy of it so we can modif...

4 years ago | 0

Answered
Installing matlab r2018b in macbook air m1
From this Answers post: "MATLAB R2020b Update 3 and later are supported on Apple silicon Macs through the Rosetta 2 translation ...

4 years ago | 0

Answered
Extract element from a table
Let's make a sample table. rng default listOfTypes = ["apple"; "banana"; "cherry"]; T = listOfTypes(randi(numel(listOfTypes),...

4 years ago | 0

| accepted

Answered
Unexpected resul when trying to plot from array "empty double row vector"
% >> x305a(1,404:end) Most likely x305a has fewer than 404 columns. As a smaller example: x = 1:10; x(1, 11:end) % 11:end is ...

4 years ago | 0

Answered
What's the problem with this simple anonymous function?
You likely meant to use n(i) in your functions, not n. Another option would be to use 1./n instead of 1/n. n = 1:3 y = 1./n z...

4 years ago | 0

| accepted

Answered
R2014b install problem
The System Requirements for release R2014b for Mac OS X list supported operating systems as 10.7.4+, 10.8, 10.9, or 10.10. It al...

4 years ago | 1

| accepted

Answered
How do I make an executable system solver?
Creation of symbolic expressions is not supported for use with MATLAB Compiler.

4 years ago | 0

Answered
How do I update array elements through a loop?
The empty Static method (you'd made a typo and used emtpy instead of empty) creates a 0-by-0 array of the class when called with...

4 years ago | 1

Answered
How exactly does MATLAB calculate a sum of array elements by its sum() function? Does it use any compensated summation algorithm such as Kahan?
You might find this post on Loren Shure's blog interesting and informative.

4 years ago | 1

| accepted

Answered
A question about the efficiency of matrix multiplication in MATLAB.
If you were going to the grocery store to pick up a bunch of items for dinner, which process would be more efficient? Go to the...

4 years ago | 1

Answered
Why do I get the error 'Unable to use a value of type cell as an index.'?
Is that table.m file that you have open in the Editor the one included with MATLAB, in which case you shouldn't have modified it...

4 years ago | 0

Answered
intersect between the second column of cell array A (for all rows) and the first column of cell array B (for all rows)
Let's make some sample cell arrays with animal names. [I'm assuming your cell arrays contain text data.] animals = {'dog','cat'...

4 years ago | 0

| accepted

Answered
write a polynomial answer in one operand
What do you mean by "solve" in this context? Do you want to find values of s that when substituted into those polynomials gives ...

4 years ago | 0

Answered
STRUCTURE RANDOM FIELD READING FROM TEXT FILE; WHAT REPLACEMENT OF 'genvarname ' ?
Use matlab.lang.makeValidName to ensure your candidate field name is a valid MATLAB identifier then use dynamic field names to s...

4 years ago | 1

| accepted

Answered
Execution of script fzero as a function is not supported:
You likely wrote or downloaded a script file named fzero.m that's taking precedence over the fzero function included in MATLAB. ...

4 years ago | 0

Answered
Which one is correct ? Using (' ') or @(var)
Some older functions allow you to specify the name of a function to call. But if you're writing code to use in a recent release ...

4 years ago | 0

Answered
To add two datetime arrays , with millisecond values
You cannot add two datetime arrays as the error message indicates. If addition of datetime arrays was defined, what would be the...

4 years ago | 1

Answered
Error in code for plot
x=linspace(0,2.*pi,101) plot(x,sin(x),'markeredgecolor','r',... x,cos(x),'markeredgecolor','g',... x,tan(x),'markered...

4 years ago | 0

| accepted

Answered
when I open already existing M file in MATLAB I get error using open(line146) failed to open MATLAB editor
Let's make sure you're using the settings function included with MATLAB as MATLAB expects. What does this command show? which -...

4 years ago | 0

Answered
histcount does not work as excepted
From the documentation page: The value X(i) is in the kth bin if edges(k) ≤ X(i) < edges(k+1). The last bin also includes the r...

4 years ago | 0

| accepted

Answered
I have a mistake in loops
Does your problem ask you to find all Pythagorean triples whose elements sum to less than 1000 or all whose elements sum to less...

4 years ago | 2

| accepted

Answered
Instead of skipping first column of matrix the for loop puts first element as a 0.
You created a by assigning to its second element. The first element cannot be empty, it has to have some value. The two most obv...

4 years ago | 0

| accepted

Answered
quiver(___,scale) invalid text character.
I'm not certain offhand where this is documented, but whenever you see ___ in the Syntax section of a function reference page it...

4 years ago | 0

Answered
Matlab is unable to evaluate very a very long expression
How did you generate this long expression? Did you generate this using Symbolic Math Toolbox? If so consider using matlabFunctio...

4 years ago | 1

| accepted

Answered
use of svds with function handles
When in doubt, check the documentation page to see if there's an example you can adapt. In this case there is, "Largest Singular...

4 years ago | 2

| accepted

Answered
Why does the modulo function seem to break for large numbers?
For sufficiently large numbers, not all numbers in that vicinity are representable in IEEE double precision. What's the distance...

4 years ago | 2

Answered
Replace array elements with strings
I recommend using a table array to store your data of mixed types. load patients T = table(LastName, Age, Smoker); head(T) % ...

4 years ago | 0

Answered
"save as" interface
Why not just use the uiputfile function included as part of MATLAB?

4 years ago | 0

| accepted

Load more