Answered
Adding vectors of different sizes... works now? Can this be suppressed?
There is no way to suppress implicit expansion. Consider by the way that 3 + eye(4) also breaks the rules of matrix addition,...

1 year ago | 0

Answered
uicontrol not working inside a function
uicontrol('Style', 'pushbutton', 'String', 'Chiudi', ... 'Position', [20 20 50 20], ... 'Callback', 'isAnimating=false...

1 year ago | 0

Answered
simulink is not working license checkout failed warning is shown
There are a few possibilities here: If you have an individual license, it is possible that you somehow installed Simulink but y...

1 year ago | 0

Answered
how to input a function as a parameter of a function
Use @fun as the parameter. For example X0 = fMin1D(.5, 17, 32, 1e-10, 0.8, @fun)

1 year ago | 0

Answered
How to extract a string from a list and use it with dot notation
stringListUpper = ["ABC","DEF","GHI"]; stringListLower = ["abc","def","ghi"]; for i = 1:3 for j = 1:3 AssignTo(s...

1 year ago | 0

Answered
Ability to timestamp vicon nexus for reaction time
For work of this kind, we recommend Psychtoolbox http://psychtoolbox.org/ which has extensive MATLAB compatibility, and is desig...

1 year ago | 0

Answered
"isfield" for hidden field in optimoptions
optimoptions returns on object of class optim.options.Fsolve not a struct. You need to use isprop(options,'JacobPattern') How...

1 year ago | 0

| accepted

Answered
Plotting second derivatives of magnetic fields.generated by Helmholtz Coils
n = sqrt(v(1^2+v(2)^2+v(3)^2)); should be n = sqrt(v(1)^2+v(2)^2+v(3)^2);

1 year ago | 0

Answered
Numerical integration methods for surface integral
Your integral is with respect to S. Nothing being integrated depends on S. Therefore the integral is constant times the differ...

1 year ago | 0

Answered
How many c0mputer I can istall and activate Matlab and how many run Matlab at same time
To do that, you would need one of: Concurrent license sized for 2 concurrent licenses Standard/Commecial/Professional individu...

1 year ago | 0

| accepted

Answered
Having a .mat file store an image to call to a tab in app designer
new_image_variable = 'Schematic'; % Save the updated data to the .mat file save('name.mat', 'new_image_variable', '-append');...

1 year ago | 0

Answered
How do I process and display a 10 and 12 bit image in matlab?
There are three primary ways of storing 12 bit images: as plain uint16() integer values in the range 0 to 4095. The "left" 4 b...

1 year ago | 0

| accepted

Answered
Generate C code from matlab code issue
Code cannot be generated for uigetdir because the C standard library does not define any directory operations. Directory ope...

1 year ago | 0

Answered
How to know which elements of a symbolic vector are real?
c(imag(c)==0)

1 year ago | 0

Answered
Help using NI-845x SPI and DIO in MatLab
spi_obj = spi('ni845x', 0, 0);

1 year ago | 0

Answered
Getting relative time from two events identified as absolute time
elapsed_as_duration = datetime(E5) - datetime(E0); Now you can ask things such as seconds(elasped_as_duration)

1 year ago | 0

| accepted

Answered
Check if the value for a field in a struct exists
A=struct('a', {}) isempty(A) isempty(A) || isempty(A.a)

1 year ago | 0

| accepted

Answered
Is is possible to redirect the output of a system command that calls another program?
HDL Coder does not appear to be supported on Mac. On Linux: Redirect output (possibly stderr) to a named pipe. Read from the n...

1 year ago | 1

| accepted

Answered
Find least binary palindrome greater than a natural number
There are two cases. In the first case, the first half of the number is greater or equal to the reflected second half of the nu...

1 year ago | 1

Answered
Elementwise multiplication of two 3D matrices
pagemtimes is for page-by-page algebraic matrix multiplication. It takes two matrices of size [A B C] and [B D C] and produces a...

1 year ago | 0

Answered
I want to get binary data from a bin file.
I was right to be concerned about the file format. The actual file format involves an 8 byte header that gives array sizes. The...

1 year ago | 0

Answered
Hello, It's pudding!! I'm new with Matlab and i'm using old version 2011a!!
for i=1:length(D) plot(freq_nat(i),zeta(i)); You are plotting a scalar against a scalar in each iteration. By default, plot()...

1 year ago | 0

Answered
I need to find the minimum value and the locations of all occurrences.
fprintf('The location of the minimum value is row %3.0f column %3.0f \n', row, column); When you do this in fprintf(), all of ...

1 year ago | 2

| accepted

Answered
How to use all CPU cores
Each pair of "logical" cores shares physical core resources. "Logical" cores have their own set of registers, but only one set o...

1 year ago | 1

Answered
Why are these zeros adding themselves to the array?
function result = expn(x,n) result = 1; for i = 1:n result = (result + x.^i/factorial(i)); end end x...

1 year ago | 1

Answered
Are there any faster alternatives to readlines?
For the purposes of the below test, I will assume that it is important that the text be split into lines, but that it is not imp...

1 year ago | 1

Answered
Error message in the console when using batch
fetchOutputs() in a try/catch environment. It will succeed if there was no error, and will throw an error if there was an error ...

1 year ago | 0

| accepted

Answered
dividing coastline into equal interval
See John D'Errico's File Exchange contribution interparc https://www.mathworks.com/matlabcentral/fileexchange/34874-interparc wh...

1 year ago | 0

Answered
Varying Marker Color by Variable with plotm
You should probably be using scatterm instead of plotm . You are using 'ko' line specification, so you are not joining points ...

1 year ago | 0

| accepted

Load more