Answered
Find the indices of numbers that occur first
[found, idxV] = ismember(X, V); This will return the idx of elements of X within V; found(K) will be false if X(K) does not mat...

1 year ago | 1

Answered
Vertical 3D to Horizontal
Instead of parenting your scatter3() to an axes (even if only by default): Create a hgtransform object that is parented to the ...

1 year ago | 0

Answered
How many template of 3D graph exist in Matlab ?
How many template of 3D graph exist in Matlab ? No templates of 3D graphs exist in MATLAB. No templates of 2D graphs exist in ...

1 year ago | 0

Answered
how to calculate amount of energy consumption energy cryptography and steganography in matlab?
Accurately measuring energy consumption on a host MATLAB session is very difficult. You need to take into account that the compu...

1 year ago | 0

Answered
how to enable mex -setup for Visual Studio 2022 on MATLAB R2021a?
R2021a supports VS 2019 at newest.

1 year ago | 0

| accepted

Answered
set the tick format of y axis
See ytickformat and also the Exponent property of axes; https://www.mathworks.com/help/matlab/creating_plots/change-tick-marks-a...

1 year ago | 0

Answered
how to use categorical in uitable
cat=categorical({'Fil';'Stat'}); That is categorical. VTYPES=[{'logical'},{cat}]; That is a cell array that includes an eleme...

1 year ago | 0

Answered
How to use fzero with arrayfun or cell fun?
tr = fzero(@(t) t_thres(t,c),[miny maxy*10]); The @(t) t_thres(t,c) part creates an anonymous function that copies its...

1 year ago | 1

Answered
How do you get a variable to recognized in function
function [C,D]=GetUserInput() That code does not mean that variables C and D are to be set in the calling context. MATLAB outpu...

1 year ago | 0

Answered
How to extract specific information from a table, an output when fitlm() function in sued
Store the result of fitlm() in a variable, such as mdl Access the Rsquared property of the variable such as mdl.Rsquared This...

1 year ago | 0

| accepted

Answered
Is there any way to perform an at least partially symbolic smulation (using ODE or discrete model) in simulink?
If you turn rapid acceleration off, and use coder.extrinsic then you can include symbolic calculations within any one MATLAB Fun...

1 year ago | 0

Answered
Name is nonexistent or not a directory
Give the commands restoredefaultpath; rehash toolboxcache savepath

1 year ago | 0

Answered
Use the plot function to set the curve transparency
plot() has no documented ability to specify RGBA, or transparency in any form. Modern versions of plot() have an undocumented a...

1 year ago | 0

Answered
expressing the complex function
You can use real() and imag(), but they will not help much. A problem is that you do not constrain x or t to be real-valued, so...

1 year ago | 0

Answered
How do I convert a decimal number of months to a datetime format?
decmonths = [9.545563 22.212227]; offsets = calmonths(floor(decmonths)) + days(decmonths - floor(decmonths)) base = datetime...

1 year ago | 0

Answered
Plotting data dependent on three independent variables.
Use scatteredInterpolant() to compute a resultant surface with three independent inputs. Use isosurface() or slice() to plot th...

1 year ago | 0

Answered
Only the first if-statement block executes,
if 0 <= alpha <= pi/2 MATLAB interprets that as if ((0 <= alpha) <= pi/2) the first part, 0 <= alpha, produces a logical valu...

1 year ago | 0

| accepted

Answered
Display Image to a specific Monitor
get(0,'MonitorPositions') will return a list of [StartX, StartY, Width, Height] coordinates. You would access the StartX and ...

1 year ago | 0

| accepted

Answered
Standalone Matlab App Runtime Error
The function https://www.mathworks.com/help/stateflow/ref/boolean.html boolean() is part of stateflow, which cannot be compiled....

1 year ago | 0

Answered
Open data in File as per user input
plot(file.(x))

1 year ago | 0

| accepted

Answered
how to enable mex detect the C/C++ compiler (integrated in Visual Studio 2022) on older MATLAB (R2018b) ?
My matlab version is 2018b, and visual studio version is 2022. MATLAB R2018b has no support for VS 2018 or later. https://www....

1 year ago | 0

Answered
How can I keep the first two elements from CSV values in a string
FilteredData = regexp(YourTable.ColumnName, '^[^,]+(,\s+[^,]+)?', 'match', 'once');

1 year ago | 0

Answered
Can a student license be used on multiple computers at a same time R2024a Version?
fullfile(matlabroot, 'license_agreement.txt') 1. License Options 1.1. Individual License Option (i) The Individual Li...

1 year ago | 0

Answered
Can I use my gpu to fasten my multiobjective optimization using gamultiobj?
In order to use GPU inside of parallel computations you would need to have one distinct GPU for each parallel computation. It i...

1 year ago | 1

| accepted

Answered
Dot indexing is not supported for variables of this type.
Change Conv = Aspen.Tree.FindNode("\Data\Results Summary\Run-Status\Output\PER_ERROR").Value; %Convergence to ConvNode = Aspe...

1 year ago | 1

| accepted

Answered
how to draw a peak line
mask = islocalmaximum(YourSignal); peak_times = YourSignalTimes(mask); peak_values = YourSignal(mask); plot(peak_times, pea...

1 year ago | 0

Answered
Error code line 19 with my Y=f(x), equation used is x^3+x^2-4x-4
equation used is x^3+x^2-4x-4 X=[x0 x1 x2]; Y=f(X); You are passing a vector of X values to f. You have coded x^3+x^2-4x-4 ex...

1 year ago | 0

| accepted

Answered
The code returns a value in the form of "theta_3b(x, z) =.". How can I get this to return just theta_3b=
theta_3b = vpa(subs(theta_3b, {x,y,z}, {X,Y,Z})); fprintf('theta_3b = %s\n', char(theta_3b))

1 year ago | 0

Answered
Convert string to 256 Characters
TEXT = sprintf('%256s', 'Unformatted Data Version='); fprintf(FILEID, "%s\n", TEXT)

1 year ago | 0

Load more