답변 있음
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년 초과 전 | 0

답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 0

답변 있음
How to know which elements of a symbolic vector are real?
c(imag(c)==0)

1년 초과 전 | 0

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

1년 초과 전 | 0

답변 있음
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년 초과 전 | 0

| 수락됨

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

1년 초과 전 | 0

| 수락됨

답변 있음
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년 초과 전 | 1

| 수락됨

답변 있음
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년 초과 전 | 1

답변 있음
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년 초과 전 | 0

답변 있음
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년 초과 전 | 0

답변 있음
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년 초과 전 | 0

답변 있음
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년 초과 전 | 2

| 수락됨

답변 있음
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년 초과 전 | 1

답변 있음
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년 초과 전 | 1

답변 있음
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년 초과 전 | 1

답변 있음
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년 초과 전 | 0

| 수락됨

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

1년 초과 전 | 0

답변 있음
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년 초과 전 | 0

| 수락됨

답변 있음
How can I use a Simulink.Signal Object as a parameter in a masked subsystem in R2022b?
Initial conditions are time-less (no time information associated.) Simulink.Signal objects have attached time. These two thing...

1년 초과 전 | 0

답변 있음
MinGW installation for Matlab R2019a
You were trying to install MinGW for R2019a during a time when R2019a was only available in pre-release (Stream "a" releases of ...

1년 초과 전 | 0

답변 있음
How to change the volume dimensions in niftiread.
niftiread just returns an array of data, without any particular size of voxels. You would have to use niftiinfo to fetch informa...

1년 초과 전 | 0

답변 있음
Need to find a specific point on a line using data from a 2 column matrix
Your y data has multiple different x values for most y values. Interpolating using y as the independent variable and x as the de...

1년 초과 전 | 0

답변 있음
Error in multolying a number and function handle
tanfi=@(x) tand(x(1)); Up to this point, you are creating function handles -- pieces of code that do not take action directly, ...

1년 초과 전 | 0

답변 있음
How to write a table in a textarea on a Matlab App?
app.Zsc.Value(cas)=compose(formatSpec,Out_Zsc(cas)); First off, your code Out_Zsc(cas) is an attempt to subscript at table with...

1년 초과 전 | 0

답변 있음
Que hacer cuando aparece un dato discreto NaN
In the worst case, there might be nothing you can do. But possibly what you could do is convert your for loop into a while loop...

1년 초과 전 | 0

답변 있음
use map data structure with simulink -android
Containers.map data structures cannot be output from Simulink blocks. The newer dictionary data type also cannot be output from...

1년 초과 전 | 0

답변 있음
Audioread Bug with Opus (maximum value returned exceeding 1)
I would say it is a bug. audioread() documents If you do not specify dataType, or dataType is 'double', then y is of type doubl...

1년 초과 전 | 0

답변 있음
compute square rooot and square of each element
You can use element-wise power, the .^ operator. For example x = [27 64] x.^(1/3)

1년 초과 전 | 0

더 보기