Answered
Draw a heptagone of dice vertices. MATLAB.
polyshape, patch, or plot are three possibilities depending on what you want to do later on with the polygon.

6 years ago | 0

Answered
How do I throw an error from TimerFcn?
The TimerFcn is running at the same time as MATLAB is executing the try / catch block but it's not executing "inside" the try / ...

6 years ago | 0

Answered
I'm keep having an error 'Not enough input arguments' for this code
Others have commented on the fact that you need to call your function with an input argument. I want to point out a different pr...

6 years ago | 0

Answered
discrepancy in date conversion
See the description of the dateType input that you can pass into datetime on the documentation page for datetime, specifically t...

6 years ago | 0

Answered
create multiple separate vectors from a For loop
Rather than creating several different variables with numbered names or even a cell array, I'd prefer to create an array. nside...

6 years ago | 0

Answered
How to change exponentiation
Change the display format. format % default which is "format short" e = [5.45894e-6, -1.875e-5, 6.25e-6; ... -1.875e-5, 1...

6 years ago | 0

Answered
I can't get millisecond accuracy from string based timestamp - not sure what I'm doing wrong
If you don't have date information associated with your timestamps, I would use duration instead of datetime. S = ["11:00:00.14...

6 years ago | 0

Answered
why do I have unrecognized function error for z?
What should the value of z be if buff is none of "none", "30min", or "60min"? What if buff was "30 minutes", for example?

6 years ago | 0

Answered
Cannot call INPUT from EVALC
You cannot call input from within evalc. I believe this is the expected behavior. evalc would prevent the prompt text from input...

6 years ago | 0

Answered
How to disable the TAB to get into an EditField box (R2020b)?
Try setting its Enable property to 'on' and its Editable property to 'off'. See the pictures in the description of the Editable ...

6 years ago | 0

Answered
Converting UTC time to seconds
s = '12:34:56.789'; formatSpec = 'hh:mm:ss.SSS'; d = duration(s, 'InputFormat', formatSpec, 'Format', formatSpec)

6 years ago | 1

| accepted

Answered
Local Function not being Entered
You define the local function RPM1 in your script file, but you never call RMP1 inside your script file. MATLAB does not automat...

6 years ago | 0

| accepted

Answered
Keep strings seperated in array
s = struct('abc', {'def', 'ghi', 'jkl'}) charVec = [s.abc] cellVec = {s.abc}

6 years ago | 0

Answered
Area of Circle syntax error
If that's the actual code your teacher gave you, they played a bit of a trick on you. [I assume the missing ' before s was a cop...

6 years ago | 0

Answered
How can i convert Matlab code to hdl code
See HDL Coder. Not all functions have the capability to have HDL code generated for them. See this list for functions that do.

6 years ago | 0

| accepted

Answered
How to fix my code for ode45
I'm guessing you've defined a variable named ode45 that's preventing you from calling the ode45 function included in MATLAB. To ...

6 years ago | 1

Answered
Is there a way to use symbolic functions in ode45
You could make your function accept additional parameters. Then you could specify a function handle as that additional parameter...

6 years ago | 1

Answered
Is it possible to rename a group of values based on the previous values in a table
So you want to change the category values for the image variable in your table? Easiest would probably be to use renamecats. we...

6 years ago | 1

Answered
logic used in matlab
When you see a line of MATLAB code you don't understand, try breaking it into pieces. If you don't understand the pieces, break ...

6 years ago | 0

| accepted

Answered
Parse error at EDD
Let's look at one section of the snippet of code you posted. for m = 1:L_Z for n = 1:L_Pe H = (Pe(n)*...

6 years ago | 0

Answered
How to model custom shapes?
The alphaShape and polyshape functions may be of interest to you.

6 years ago | 0

Answered
Simulink version 5.0 download
Looking at the release history in the PDF User's Guide, Simulink 5.0 was part of release R14 (not release R2014a or R2014b) whic...

6 years ago | 0

Answered
Trouble creating function handle with matrices in matlab
mdlfunc = @(b,x1) -R_const*T(x1.* log(x1 + b(1).* x2) + x2.* log(x2 + b(2).* x1)); You meant to multiply T by the quantity (x1....

6 years ago | 1

| accepted

Answered
Plotting mean across a graph
If I understand what you want to do correctly, use the yline function. x = datetime('today') + days(0:9); y = 10*rand(size(x))...

6 years ago | 0

Answered
selectLabelsByName not working on MATLAB 2020B
According to the Support site's documentation search it appears there are two functions by that name. Because of the categories ...

6 years ago | 0

Answered
Error: File: testem.m Line: 87 Column: 5 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
If you're going to put the end keyword (or the elseif keyword that's part of an if statement) on the same line as another statem...

6 years ago | 0

Answered
How to call data from files named with dynamic index
%{ % for each of these text files, plot a set column as x and another as y figure hold on % k is a high number and the numbe...

6 years ago | 0

Answered
Defining multiple variables in a single loop
You are, of course, using a loop. I suspect what your supervisor told you (or intended to tell you) is that you don't need to us...

6 years ago | 0

Answered
MATLAB matrix using in function
Use element-wise division for the operations that will operate on the vector a_ef. deltap=-7.55*(M^2/R^2)*(1./(0.116+log(R./2.4...

6 years ago | 0

Answered
Audio Toolbox : Illegal use of reserved keyword "classdef"
To use a class file you don't run the classdef file directly. You construct the object by calling the constructor (the function ...

6 years ago | 0

Load more