Answered
Undefined function 'isnan' for input arguments of type 'Nodes2'
if I understand correctly, obj.head is either a class member or else NaN for the case where the queue is empty. In the case w...

4 years ago | 0

| accepted

Answered
How can I properly enter this function in MATLAB
My *guess* is P = p(a+b).*(3-sqrt(3*a+b).*(a+3*b)) ./ (a+b)

4 years ago | 0

Answered
How to quickly identify a list of nearby stations?
First, divide the stations into subsets: stations close enough to the North Pole that the smaller distance between degrees of l...

4 years ago | 1

Answered
What code what should I input in the slope, y tangent and y normal? I am currently stuck and tried some codes but it still has an error as seen in the second photo..
https://www.mathworks.com/matlabcentral/answers/1816015-can-someone-help-how-to-calculate-the-slope-tangent-line-and-normal-line...

4 years ago | 0

Answered
How can I pivot using if else?
If you [row, col, pv] = find(C,1); then if row is empty then the entire C matrix is 0; otherwise pv would be the pivot value a...

4 years ago | 0

| accepted

Answered
I want to pass data between two windows of GUI
Something closer to Mainapp: properties (Access = public) force area end % Callbacks that handle component events methods...

4 years ago | 0

Answered
Can someone help how to calculate the slope, tangent line and normal line? I'm lost on how I should code those three and I don't have much infor from clas how to code these 3.
The equation of a straight line is often stated in the form y = m*x + b You have calculated y0 (the value the equation w...

4 years ago | 0

| accepted

Answered
Error while executing mpc algorithm in MATLAB
x=[x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12].'; u=[u1 u2 u3 u4].'; Those are column vectors of length 12 and 4. A=sub...

4 years ago | 0

| accepted

Answered
How to add a particular font to path with toolbox?
See https://www.mathworks.com/matlabcentral/answers/514119-can-i-add-custom-fonts-to-my-matlab-desktop-in-preferences Note that...

4 years ago | 0

Answered
Find a point operation (in tabular form) that will equalize a 3-bit image with the following histogram.
One possible interpretation is that each level should be associated with a brightness, and that as closely as possible the total...

4 years ago | 0

Answered
fopen file, read number with fscanf, then write back to same file with fprintf
You need to rewind the file, or you need to fseek() to move the file pointer. %prepare the initial file filename = 'myfile.txt...

4 years ago | 0

| accepted

Answered
How to quickly identify a list of nearby stations?
If you have the Mapping Toolbox then use distance If you do not have that toolbox then see the File Exchange https://www.mathwo...

4 years ago | 0

Answered
How do I limit the results of atan2() or any other options for nonlinear functions between a specific range?
How do I limit the results of atan2() or any other options for nonlinear functions between a specific range? Suppose you did th...

4 years ago | 0

Answered
How can I overcome the error "variable admit must be of data type logical instead of double".
You assign the result of the comparisons to test1 and test2. But then you overwrite test1 and test2 with [] . [] is an empty dou...

4 years ago | 0

| accepted

Answered
need a for loop that displays value at each point of x.
You are calculating with floating point coefficients in two different ways. You are using == to test equality, which tests for b...

4 years ago | 0

Answered
How to create a 1400 × 2 matrix of normally distributed random multiples of 10?
You can round(x, -1) to round to the nearest multiple of 10. However, Normal Distribution is inherently a continuous distribu...

4 years ago | 1

| accepted

Answered
I need help solving this Fourier series using Matlab.
Any one series of fourier coefficients would be valid for a section to be approximated as being a consistent function of time. ...

4 years ago | 0

Answered
How to use the simulation time in an embedded function in matlab
You are calling hybrid() in a context where through propagation or backwards propagation or explicit setting in the block, or by...

4 years ago | 0

| accepted

Answered
Input image data directly from Variable and not DataStore?
<https://www.mathworks.com/help/matlab/ref/matlab.io.datastore.arraydatastore.html>

4 years ago | 1

Answered
how to simplify a symmatrix expression
syms MW0 [3 3] matrix syms MDW0 [3 3] matrix syms Cn [3 3] matrix expression = Cn*(MW0+ MDW0) - Cn*MW0 class(expression...

4 years ago | 1

Answered
Check what values of three variables fulfill a certain condition
You do not need to loop over z. Instead, take z = sqrt(x.^2+y.^2) and test to see whether z is an integer. And... vectorize. Fo...

4 years ago | 0

Answered
Gauss Elimination - making my upper triangular matrix
length(b) of a 2D array is defined as length = 0 if isempty(b) length = max(size(b)) otherwise You should avoid using length(...

4 years ago | 0

| accepted

Answered
Graphing partial sums of harmonic fourier series
Use x = linspace(-2, 4, 200); Currently you are using x = [-2, -1, 0, 1, 2, 3, 4] which is not enough to get a decent graph.

4 years ago | 0

Answered
Comparing difference between two tables
If you mean that they are table() objects, then you cannot index a table object using only a single subscript. You can, however,...

4 years ago | 0

Answered
what does this line of do
FV might be a structure that has a field named totalArea and the content of the field is to be copied to a destination. Or po...

4 years ago | 0

Answered
How i can input values from user in array
consider an editable uitable().

4 years ago | 0

Answered
i am receiving the error "Execution of script loopRectangular as a function is not supported" when i try to run the following line of code: ha=loopRectangular('Length',1.0,'W
It sounds as if the function is defined inside the mlx and you are trying to call it from outside the mlx. That is not possible....

4 years ago | 0

Answered
extracting rows from large table
mask = YourTable{:, 5} == 0; subset0 = YourTable(mask, :);

4 years ago | 0

| accepted

Answered
Access Sub-fields of multiple different-named fields in struct
struct2cell(structfun(@(F)F.x, s, 'UniformOutput', 0))

4 years ago | 1

Answered
Why does sqlread() not work?
https://www.mathworks.com/help/database/ug/sqlite.sqlread.html sqlread() for sqllite() requires r2022a or later; you are usin...

4 years ago | 0

Load more