Answered
Matlab Invalid Data Argument
Let's look at your code section by section. u = @(t) (t>=0); r = @(t) t.*u; This will not work as written. You cannot multipl...

6 years ago | 1

Answered
How to get == to help solving equations
My guess would be that you had redefined y between the syms call and when you tried to use it as a symbolic variable. syms y f...

6 years ago | 0

Answered
Converting these mathematical formulas to a matlab equation.
(x1)^.2 You probably didn't mean to raise a square matrix x1 to the 0.2 power here for two reasons. By the way, cos isn't qu...

6 years ago | 1

| accepted

Answered
Trouble getting function to work. Not enough inputs.
You need to call it with one input argument, the data you want to analyze. You cannot (directly) use the green triangle button t...

6 years ago | 1

| accepted

Answered
Why does MATLAB return a "not enough input arguments" error when I try to launch visdiff with proper number of arguments from windows command prompt?
Wrap the command in double quotes. matlab -r "disp('hello world')" Compare with the result you get from: matlab -r disp('hell...

6 years ago | 1

| accepted

Answered
Is Matlab 2020a cover all previous updates 2019b update 5,6?
Unless your user using release R2019b Update 5 is using functionality that changed or was removed in release R2020a (see the Rel...

6 years ago | 0

Answered
How to load multiple *.mat files in a directory into individual 271x1 vectors. Not structures. Need them named dynamically. Don't crucify me.
How do you distinguish the X and Y data stored in each MAT-file? Or do you have a 271-by-N variable stored in each MAT-file, wit...

6 years ago | 1

Answered
Datatip color and styling [Request]
In order to file an enhancement request officially, please contact Technical Support using the Contact Support link on the Suppo...

6 years ago | 0

Answered
How to create (x,y) matrix in complete graph in matlab
If this is not a homework assignment where you're expected to write the code to plot a graph yourself, just use the graph functi...

6 years ago | 0

Answered
Are datasets available for previous studies conducted in MATLAB?
You should contact the authors of the paper and ask them for their data. Just because MATLAB was used in analyzing the data does...

6 years ago | 0

Answered
Graph/centrality- Is there a way to avoid "Expected Cost to be positive" error?
Are any of your weights non-positive? Specifically check if any are equal to 0.

6 years ago | 1

Answered
Evaluate a function of symbolic variables
Use subs to substitute values for the symbolic variables in your expression. When you go to use your symbolic expression in fmi...

6 years ago | 1

| accepted

Answered
OOP Dynamic Properties ordering is very strange...
I would be very wary of overloading properties or methods for your object. There may be an easier way to do it, but you can que...

6 years ago | 0

Answered
How to visualize graph nodes on top of image with segmented cells they correspond to
The example in this post from Loren's blog superimposes a graph of state centroids onto a map of the states represented as a col...

6 years ago | 1

Answered
Plot multiple histogram within 1 function
The "Plot Multiple Histograms" example on the documentation page shows how to superimpose two histogram plots using hold on.

6 years ago | 1

Answered
one script two anonymous functions
Based on the problem description I'm guessing C is an angle in degrees, not radians. If that's the case take a look at the sind ...

6 years ago | 1

Answered
What did I do wrong in my 'for' loop function?
In this line of your code: nb(B) = (nb(B-1)+1) + ((nb(B-1)+1) * mir) + mc; What's the old balance? Are you certain that yo...

6 years ago | 0

Answered
Creating an array of dependent symbolic variable
syms A [1 2] eq1 = A(1)+2*A(2) == 42 eq2 = 3*A(1)-4*A(2) == 99 S = solve(eq1, eq2) A1 = S.A1 A2 = S.A2 subs(eq1)

6 years ago | 0

Answered
How to solve 'Unrecognized Function or Variable' Error Code
Are you trying to run the script from inside the ZIP-file, without extracting it? That won't work. Extract the files to a direct...

6 years ago | 0

Answered
Can someone please tell me about AcNup package?
Searching the MathWorks website for AcNup found four hits, three of which don't appear to be relevant and the fourth of which is...

6 years ago | 0

Answered
Cannot figure out what I am doing wrong here.
That plots one point but by default the line created by plot includes no Marker. axis([0 1 0 1]) hold on h = plot(0.25, 0.25)...

6 years ago | 0

Answered
How to replace -999 values with NaN in a Matlab table?
Use standardizeMissing. t = array2table(magic(4)); t{2, 'Var3'} = -999 t2 = standardizeMissing(t, -999)

6 years ago | 1

| accepted

Answered
Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
Smart indent your code in the MATLAB Editor. When I did that for your code sample, there were two end statements after the one t...

6 years ago | 0

| accepted

Answered
Struct contents reference from a non-struct array object
function [ CRRA ] = CRRA(x) tur = load('tur.mat'); wei = load('wei.mat'); The preceding two lines load the MAT-file each an...

6 years ago | 0

| accepted

Answered
finding a phrase in a modularized code with over 1000 functions
You can use the Find Files tool in the File section of the Home tab of the toolstrip.

6 years ago | 0

Answered
Maximum number of clients reached
How many figures are you trying to have open simultaneously? If that number is large, do you need to have them all open at the s...

6 years ago | 0

Answered
how do I recover lost parts of MATLAB
That indicates the MATLAB path has not been set correctly this session. Have you tried what the message told you to try? Warnin...

6 years ago | 0

| accepted

Answered
3 on top, 2 on bottom subplot
Those are two rows of subplots. The first has three subplots: subplot(2, 3, 1, 'Color', 'r') subplot(2, 3, 2, 'Color', 'g') s...

6 years ago | 1

Answered
How to define a struct array with length more than one and assign values to one of the strucy array?
A.1 is not a valid struct field name. With something this simple, I probably wouldn't use a struct array. A = [1 0.2 3 0.4 5 6...

6 years ago | 0

Answered
Bisection method code matlab
Rather than hard-coding the function you want to solve, you might want to create a function handle to the function and use that ...

6 years ago | 0

Load more