Answered
Is there a way to save the c3d files using the uigetfile function in the order that you select rather than have them be imported in alphabetical order?
uigetfile() calls out to native operating system facilities. There is no control over the order it returns items. If you do n...

3 years ago | 0

Answered
Help on opening a .fid file
There is no *possible* code that can read an arbitrary binary file and reliably extract the intended data. There is no internati...

3 years ago | 1

Answered
Getting this error in matlab coder, Function 'imageInputLayer' not supported for code generation.
You can not fix it. That function is used for training networks, but code generation is not supported for training networks. ...

3 years ago | 1

Answered
The 'diff()' function is running incorrectly in this program (Error using diff Difference order N must be a positive integer scalar)
There are two major diff() functions. You thought you were using calculus derivative, diff . However, that diff() function only...

3 years ago | 0

Answered
I want to solve this equation for a and b where A and B is a vector data with dimension (1344x1) A=a(B)^b
p = polyfit(log(B), log(A), 1); a = exp(p(2)); b = p(1); This would at least be a good starting point for a search in linea...

3 years ago | 0

| accepted

Answered
How to solve transcendental equation
You are losing too much precision when you create your coefficients as double precision and manipulate them together before goin...

3 years ago | 0

| accepted

Answered
Why do I receive default error callback warning while running a loop?
Your animation is extending XData by one (or more) points, and then extending YData by the same number of points, but as differe...

3 years ago | 0

Answered
using greater than or less than in 'switch' and 'case' expressions
x = 7 switch true case x > 5 disp ('x is greater than 5') case x < 5 disp ('x is less than 5') otherwise disp ('erro...

3 years ago | 1

Answered
MATLAB package support for arduino, does not support Arduino Nano Every?
https://www.mathworks.com/hardware-support/arduino-matlab.html The currently supported models of Arduino Nano are: Nano 3.1 ...

3 years ago | 0

Answered
Dot indexing is not supported for variables of this type. For an array in an object
When you use an object method using dot syntax on an object, then the object is always passed as the first parameter to the meth...

3 years ago | 0

| accepted

Answered
3D Solid Cube
Create an hgtransform parented to the axes. Create a patch() object parented to the hgtransform . Set the Matrix property of the...

3 years ago | 0

| accepted

Answered
When using ode45, have Error using odeget Unrecognized property name 'NonNegative'. See ODESET for possibilities.
You can use pathtool() to move MatCont7p3 further down in your path. This is likely to interfere with running part of MatCont7p...

3 years ago | 0

| accepted

Answered
MATLAB 2023a: How to assign multiple values(keys?) to one key using dictionaries?
You can create a dictionary which takes scalar keys, for which the associated values are (distinct) dictionaries. You can creat...

3 years ago | 1

Answered
Syntaxis in the way to write an input for Bisection Method (to find roots of equations)
Unless you are specifically required to have compatibility with MATLAB 5.1 or earlier, or unless you are specifically requires b...

3 years ago | 0

Answered
How do I display a button on a figure which is also showing an image?
h = uicontrol('style', 'push', ... 'Position', [x y width height], ... 'String', 'Push Me', ... 'Callback', @Func...

3 years ago | 0

Answered
Error using mupadengine/feval_internal
syms y(x) x Y r=0.05; m=0.01; p=1; s=1; a=0.25; b=0.25; Dy = diff(y); D2y = diff(y,2); ode= y-1/x*1/(r-((p*Dy*x*(s^2))...

3 years ago | 0

| accepted

Answered
Scatterplot with value-mapped colors?
turbineX = [387.5912409 1425.547445 2368.248175 3337.226277 4191.240876 607.6642336 1573.357664 2545.620438 3488.321168 4417.883...

3 years ago | 0

Answered
Count the number of days between two conditions
There is a very useful trick to use: mask = reshape(T,1,[]) > 5; starts = strfind([0 mask], [0 1]); stops = strfind([mask 0],...

3 years ago | 0

Answered
Im trying to slice an image and switch its quadrants so that I switch the bottom right quadrant and the top left quadrant and the bottom left quadrant with the top right quad
newImg = img(3,botRight,botLeft,topRight,topLeft); That would try to index the array img using 3 as the row index, using the en...

3 years ago | 0

Answered
Why do I keep getting this error? Error using surf Z must be a matrix, not a scalar or vector.
ki=pi/180; kinc=pi/180; kf=pi; ji=5; jinc=5; jf=100; [k,j] = meshgrid(ki:kinc:kf,ji:jinc:jf); h = sin(k); g = cos(k); Moment...

3 years ago | 0

Answered
How to make this loop more efficient?
[d1,s,r] = xlsread('alpha-beta-maxslope.csv'); for i=1:3 suf1 = d1(1,i); for j=1:3 suf2 = [suf1 d1(2,j)]; ...

3 years ago | 0

Answered
Unrecognized function or variable 'options'. for simulannealbnd, but works for fminunc
if isequal(optimfun, @simulannealbnd) options = optimoptions(... 'TolFun',1e-9,... 'TypicalX',scale*ones(...

3 years ago | 1

Answered
Error when reading the text file
S = fileread('output3.txt'); filtered_S = strjoin(regexp(S, '^\s*\S+\s+\S+\s+\S+\s+\S+\s*$', 'match', 'lineanchors'), '\n'); d...

3 years ago | 0

| accepted

Answered
can i get acorrection for this code? please i want to know where is my mistake.
fprintf('Kinematics_analysis_of_quick_return_mechanism solving_position_constraint\n'); fprintf('quick return mechanism'); x0=...

3 years ago | 0

Answered
Matrix index is out of range for deletion
filename = "IMBD_reviews_smol.csv"; data = readtable(filename,'TextType','string'); data.sentiment = categorical(data.senti...

3 years ago | 1

| accepted

Answered
A plot command does not work in a newer version of MATLAB
The problem is not with plot(): the problem is not finding Uprav . The line of code you are using can only exist in Simulink in...

3 years ago | 0

Answered
too many output arguments when calling axis in cellfun
The code sequence @(x,i){... figure(i);... set(gcf,'Position',[400*(i-1),50,400,300], 'color','w');... fill(real...

3 years ago | 0

Answered
How to output additional variables from objective function using ga optimization?
Have your objective function return a data structure of additional values. memoize() your objective function with a fair size bu...

3 years ago | 0

Answered
How to vectorize integral2?
No, there is no way to speed that up by vectorizing. In general, if you have multiple functions to calculate at the same time, ...

3 years ago | 0

| accepted

Load more