Answered
Differentiation of a function to a variable order
If you could do that, there would be three possibilities: That symsum() hypothetically specially recognizes the construct diff(...

3 years ago | 1

| accepted

Answered
Is it possible to show two .fig files in the same figure?
figures are the top-level documented visible graphics objects. .fig files represent figures. It is not possible to display two ....

3 years ago | 1

Answered
glitch in the MATrix: unable to get logical consistency between matrices with same values
Your code does not explicitly set a format, so your calculated values are 15 to 16 digits but your displayed values are 4 digits...

3 years ago | 1

| accepted

Answered
Can I implement wired and wireless TSN using Matlab?
You will not find much support for this in MATLAB. Practical implementations of OSI are getting scarcer; they are not used much ...

3 years ago | 0

Answered
Using Parallel Computing Toolbox to run code on CPU and GPU simultaneously
%outline max_available_gpu = gpuDeviceCount(); max_available_workers = 8; num_available_gpus = max_available_gpu; num_availa...

3 years ago | 0

Answered
Formatting output to not use scientific notation
format long g exp(randn(3,4)*1e2)

3 years ago | 0

| accepted

Answered
Why won't datetime work for 0:00?
datetime('01/31/1983'), ans.Format datetime('01/31/1983 00:00'), ans.Format datetime('01/31/1983 17:45'), ans.Format What is ...

3 years ago | 2

| accepted

Answered
Why am I getting Empty sym: 0-by-1, everything in SYMS is just equal to itself, the eqn1 is working properly comparing the correct things, but not working properly, pleasehelp
clc clear Wab= [0 0 -20.9] ; %Rads/seconds (i,j,k components of omega AB rod) Rba= [2 2 0]; ...

3 years ago | 0

Answered
Converting 2D cell array to 3D matrix
cell2mat(reshape(YourCell, 1, 1,[]))

3 years ago | 0

Answered
How do you reopen a corrupted Matlab file?
If you are using Linux then you might get caught by a kernel change to the handling of tempfs. Mathworks created updates for som...

3 years ago | 0

Answered
pause function doesn't work R20a
Is that definitely the code? pause() without any parameter waits for a key to be pressed on the keyboard Exception: if pause ...

3 years ago | 0

Answered
the best way to save .txt
You could consider using readcell and writecell ... but sometimes the easiest way is just to fopen / fprintf / fclose

3 years ago | 1

Answered
Code generation failed due to unexpected object of type 'RootOf'.
D2ynum = solve(ode==0, D2y, 'maxdegree', 3);

3 years ago | 0

| accepted

Answered
How do I display .mat file as an image in Matlab
example_matrix = im2uint8(1); should be (I) instead of (1)

3 years ago | 0

Answered
Can I use parfeval in App Designer to plot to a UIAxes while the code keeps running?
Regardless of whether you use a parallel pool or the newer background pool, no parallel worker of any kind can directly affect t...

3 years ago | 1

Answered
how know size of field struct
What you failed to indicate is that Sis is a non-scalar struct. Sis.D is then "struct expansion". So size(Sis.D) is the same ...

3 years ago | 1

| accepted

Answered
include all rows matrix in []
zc = num2cell(z,1); %1 --> preserve first dimension [Sis.h] = zc{:}; %or [Sis.h] = deal(zc{:});

3 years ago | 1

| accepted

Answered
How can I iterate through all .txt files in a folder to process them with already written code?
projectdir = 'location/of/text/files'; dinfo = dir(fullfile(projectdir, '*.txt')); filenames = fullfile({dinfo.folder}, {din...

3 years ago | 0

| accepted

Answered
How we can use fminsearch with a vector as input and return a scaler as an output?
y is 1000 x 1. You are passing scalar 0 as the initial value for fminsearch() so at each step h will be 0 inside your gradient ...

3 years ago | 0

| accepted

Answered
How can I find the elapsed time between two images from video file with matlab.
Unfortunately, none of the common video formats record absolute time for frames. If you are using videoreader() then you can u...

3 years ago | 0

Answered
textscan does not scan the text as accurate as strread, i have "errors"
a = "C +01.314 +027.11 +01.225 +01.578 +01.579 Air" Result = textscan(a,'%s%f%f%f%f%f%s','Delimiter',' ', 'multi', true) ce...

3 years ago | 1

Answered
how do I turn a piece of code into a parametric optimisation
% % Matrix properties (8552 example) Em = 380E3; % Young's modulus num = 0.22; % Poisson's ratio Vv_vals = [0.01, 0.38, 0.47...

3 years ago | 0

| accepted

Answered
Problems using Plot function
You are plotting one point at a time. By default, plot() does not put in any markers, and plot() can only draw lines when there ...

3 years ago | 0

| accepted

Answered
A unknown bug on matrix
Consider: A = [3 2 1 0 -1 -2 -3] Are you expecting the result to be [3, 2, 1, (0-1-2-3)] --> [3, 2, 1, -6] a vector of 4 eleme...

3 years ago | 0

| accepted

Answered
How to solve this equation?
There are multiple solutions. p=0 is a solution for all a values, but there are also complex solutions -- and you did not rule o...

3 years ago | 0

| accepted

Answered
how to reduce time for this Convolutional Neural Network to get result?
See https://www.mathworks.com/help/stats/fitcecoc.html#d124e356431 for information on 'options' 'useparallel' for computation in...

3 years ago | 0

Answered
i need wave_gen function but i can't find it!!!
See https://www.mathworks.com/matlabcentral/answers/26814-use-of-wave_gen-function#answer_34917

3 years ago | 0

Answered
serialport / bluetooth issues
What that second post is telling you is that serialport() has an internal onCleanup that is invoked when serialport() detects th...

3 years ago | 0

Answered
looking for convenient way to extract matrix from 1*n*n
A = zeros(5,5,5) B = permute(sum(A,1), [2 3 1]); size(B) squeeze() is a convenience function that ends up invoking permute()....

3 years ago | 0

Answered
tiledlayout() "exceeds array bounds" when repeated running the script, but works when workspace cleared
tiledlayout.Padding = 'compact'; That creates a struct named tiledlayout <https://www.mathworks.com/help/matlab/ref/matl...

3 years ago | 0

Load more