Answered
Equation Error Argument to dynamic structure reference must evaluate to a valid field name
The number 1 is not a valid struct array field name. S = struct('a', 1, 'b', 2) S.('c') = 42 % works S.(1) = -99 % does not w...

5 years ago | 0

| accepted

Answered
How to plot time format
Now you'd probably want to use a duration array. h = randi(3, 1, 10); m = randi([0 59], 1, 10); s = randi([0 59], 1, 10); D ...

5 years ago | 0

Answered
How to call a private function in a static function in App Designer?
Nowhere in your static method have you defined the variable app. methods ( Static ) function xd = anaerob(~...

5 years ago | 0

| accepted

Answered
Interactive with graphics in GUI
ax = axes('ButtonDownFcn', @(varargin) disp('hi')); Click on the axes. MATLAB will display hi in the Command Window. Now add a...

5 years ago | 0

| accepted

Answered
Error while finding determinant
Do you by any chance have a variable named det in your workspace? If so you will not be able to call the det function until that...

5 years ago | 1

Answered
Open Matlab editor while running from command line
We stopped shipping the standalone editor quite some time ago, long enough that I can't find it in the Release Notes. It's proba...

5 years ago | 0

Answered
Anyone know why it isnt accepting my expression
You're missing two multiplication signs. This is not valid MATLAB code. 2(w+vk) You need 2*(w+vk)

5 years ago | 0

| accepted

Answered
How to use DATE Excel Function in Matlab vector calculations?
Don't work with serial date numbers unless you absolutely have to. Use a datetime array instead. dt = datetime('now') + hours(r...

5 years ago | 0

| accepted

Answered
Range of matrices?
Tsigma(k)= [c^2 s^2 2*c*s;... s^2 c^2 -2*c*s;... -c*s c*s c^2-s^2]; What's on the...

5 years ago | 0

| accepted

Answered
Match different time series with one date vector
Consider storing your time-based data as timetable arrays and use synchronize to synchronize the timetables to a specific date a...

5 years ago | 0

| accepted

Answered
How to tell solver that symbols are matrices
If you're using release R2021a or later and have Symbolic Math Toolbox, create a symbolic matrix variable using the syms or symm...

5 years ago | 0

| accepted

Answered
Is it possible to generate specific random numbers?
Sure. seedvalue = 0; expected = [89 70 10 12 67 25 200 18 90 86]; rng(seedvalue, 'twister'); actual = randperm(max(expected)...

5 years ago | 0

| accepted

Answered
Best Matlab Editor replacement?
a better list of functions that is permanently visible and can be sorted and clicked, bookmarks, etc... In the Navigate section...

5 years ago | 1

Answered
Need to run two counters in a foor loop
F = 3; S = 4; for first = 1:F fprintf("Counting up, first is %d\n", first) for second = S:-1:1 fprintf("Cou...

5 years ago | 0

Answered
Assign value to variables
Can you define variables with numbered names like X1, X2, X3, ... ? Yes. Should you do this? Generally we recommend against it....

5 years ago | 0

Answered
Error with function handle while running Genetic Algorithm code
According to the documentation for the ga function you could be trying to call one of these syntaxes (ignoring the number of our...

5 years ago | 1

Answered
Why do logical operators do not work with the eigenvalues of this matrix?
The eigenvalue is not exactly equal to 1. It is close enough to 1 that it is displayed as 1 in the default display format. You ...

5 years ago | 0

Answered
Error using ' (line 214) Undefined function 'ctranspose' for input arguments of type 'table'. Use the ROWS2VARS function instead.
Your variable data, being created by readtable, is a table. So are the variables like MktRF_star that you create by extracting o...

5 years ago | 0

| accepted

Answered
frprintf into a file with adding the symbol for Single quote
fprintf('There''s two main ways to print a single quote') fprintf('Two single quotes '''' in a char format specifier prints a s...

5 years ago | 0

| accepted

Answered
Out of memory- infinite recursion error
Let's say I call cicelyscode with an input argument. cicelyscode([0 1]) This will create a figure then start the for loop to i...

5 years ago | 0

Answered
Acces data at given timestamp in a timetable
If you know it's in there exactly use ==. If you think there's a close match but maybe not exactly the same times I would create...

5 years ago | 0

Answered
Matlab licensing on virtual machines
I advise you to contact the Sales department and discuss your planned system configuration with them. They can work with you to ...

5 years ago | 0

Answered
Please help with unexpected outputs from symbolic expressions.
phi_1 = (1 + sqrt(sym(5)))/5 This performs the sqrt call first on a sym object representing to generate a sym result. The addi...

5 years ago | 0

| accepted

Answered
No more input arguements
Your function is defined to use an input argument. function in = localResetFcn1(in) You reference that input argument in your ...

5 years ago | 0

Answered
Matrix with no consecutive nearest neighbours
For a 3-by-3 assuming you mean the numbers from 0 to 8 or 1 to 9 the answer is no. The center element is 8-connected to all the ...

5 years ago | 0

Answered
Error using reshape Number of elements must not change. Use [] as one of the size inputs to automatically calculate the appropriate size for that dimension.
Set an error breakpoint and run your code. When you reach the line where you call reshape confirm that obj.D(1, w, :) is the siz...

5 years ago | 0

| accepted

Answered
Matlab ignoring pathdef updates
You wrote "The data acquisition toolbox disappears." Does that mean that calling functions in that toolbox don't work or does it...

5 years ago | 0

Answered
Finding corresponding values between array
I'm not certain I understand your question. Let's take a concrete example. Can you tell us what the answer you'd want to receive...

5 years ago | 0

| accepted

Answered
How does one call the constructor of a subclass, from a script which only knows about the superclass?
Each constructor can take one of two things: the arguments to build a new individual, or an array of individuals (usually two), ...

5 years ago | 0

Answered
How to do Randi with letters
There's no need for the first loop since randi can create a vector of values. r = randi([1000,9999],1,4) Since you're using a ...

5 years ago | 1

Load more