Answered
Transmit bitstream through serial port
bytes = typecast(swapbytes(int16(num2int(q,VALUES))), 'uint8') Note: this has been deliberately arranged to have the high-order...

3 years ago | 0

Answered
Make two vectors equal with zero inserted in the missed location values of the small vector
for loop. No point trying to be smart about it, if you can guarantee that the second one is always a series of sub-sequences of ...

3 years ago | 0

Answered
Create Figure Without Displaying it
I'd like to create a figure and save it in the background without displaying it. In MATLAB, creating a figure always makes the ...

3 years ago | 3

Answered
How to realize the (symbolic) bilinear transformation from z-domain to s-domain?
bilin is part of the Robust Control toolbox, and has no capability to work on symbolic expressions.

3 years ago | 0

Answered
Apply a specific RGB color on plot3
plot3(selection(:,1),selection(:,2),selection(:,3),'.','MarkerFaceColor',[0,0,1],'Markersize',5) There is also MarkerEdgeColor....

3 years ago | 0

Answered
Getting error while running alexnet
When you call alexnet() with 'Weights', 'none' then the result you get back is a Layer array, not a DagNetwork or LayerGraph. T...

3 years ago | 0

Answered
Unable to perform assignment because the size of the left side is 1-by-2 and the size of the right side is 1-by-3
syms x real okay, x is symbolic n = (b-a)/h n works out to be a number slightly larger than 3 px = sqrt(x) The first time t...

3 years ago | 0

Answered
when run net=googlenet get error
Folder D:\recycle101 is on your MATLAB path, and it contains a script D:\recycle101\googlenet.m -- a .m file that is not a funct...

3 years ago | 0

| accepted

Answered
why is this function not working?
If you are trying to create a function named update for the purpose of processing callbacks for the slider, then you will need t...

3 years ago | 0

Answered
fminunc undefined at initial points
J = -1/m*(y'*log(tmp_sig+(1-y')*log(1-tmp_sig))); 1-tmp_sig is strictly positive, but includes values that are less than 1 (as ...

3 years ago | 0

Answered
Unable to configure matlab with System Generator (Vivado 2020.1 with System Generator , Matlab R2020b).)
R2020a supports Xilinx Vivado 2019.1 R2020b supports Xilinx Vivado 2019.2 See https://www.mathworks.com/matlabcentral/answers/...

3 years ago | 0

| accepted

Answered
open system from mmatlab
That example requires R2022a or later.

3 years ago | 0

Answered
Convert Pixel value to HU on MicroCT without the Rescale Slope and Rescale Intercept Attribute
Rescale Slope and Rescale Intercept may be omitted when the slope is 1 and the intercept is 0. When the pixel data is int16, th...

3 years ago | 1

| accepted

Answered
Only seven lines of code, the program runs continuously without any results when solving the equation
syms I A B = sym(0.02);%blocking probability N = sym(800);%number of channels very huge FN = factorial(N); eqn = (A^N)/FN ==...

3 years ago | 0

| accepted

Answered
helps for understanding how to implement "sinusx" function in the calcSNR.m file
https://www.edaboard.com/threads/sigma-delta-calculation-of-snr.297827/

3 years ago | 0

Answered
Index exceeds the number of array elements (0).
data = textscan(fid, '%s', 'delimiter', '\n'); The %s format always uses cell array of character vectors, never string(), so he...

3 years ago | 0

Answered
How to define numerical variable names in a loop
jan_names = "1/" + (1:31); feb_names = "2/" + (1:28); varnames = [jan_names, feb_names]; rownames = string(1979:1979+size(You...

3 years ago | 0

| accepted

Answered
How can I save one of variable in my function ?
Don't do that. ode45 works by evaluating the given function 6 times per trial, with the inputs carefully chosen according to ...

3 years ago | 0

Answered
How to plot 5D in MATLAB
You cannot. A screen has two independent physical coordinates. You can use animation to add a time coordinate. You can use color...

3 years ago | 0

Answered
How to find a polynomial that best fit with scatter plot?
data=readmatrix('lv_vl.csv'); x=data(:,1); y=data(:,2); scatter(x,y,5,'.r') p = polyfit(x,y,2); eqn = poly2sym(p) xest...

3 years ago | 0

| accepted

Answered
Error on using rotate - to many input arguments
MATLAB offers several different rotate() functions -- but all of them are effectively class methods -- functions that only opera...

3 years ago | 0

Answered
One of my plots doesn't show and I am not sure why.
You have two plot() statements within the same subplot(), and no hold on, so the last plot (for part 2) replaces the second-last...

3 years ago | 0

Answered
Installing cvx (Linux version)on MATLAB online encountered an error
cvx is a licensed program. In order to run it, you need to have obtained a license file that associates the username you are run...

3 years ago | 0

Answered
PWM output block in PX4 toolbox for Simulink, how does it work?
According to https://www.mathworks.com/help/supportpkg/px4/ref/attitude-control-px4-external-input.html The PX4 PWM Output b...

3 years ago | 0

| accepted

Answered
Simulink Error: MATLAB expression '<output of pyrunfile>' is not numeric.
?? What data type are you expecting to get back from pyrunfile, such that you want to call vpa() on it and then call double() on...

3 years ago | 0

| accepted

Answered
Matlab is giving me an error saying that the left side is 2 by 1 and right side is 2 by 2 on the last line of the code
You do not show us the code for NextStep so we can only guess. One of the more common causes of this kind of issue is if you ac...

3 years ago | 0

Answered
There is a 1:1 mapping between the points in 2 separate 3D spaces. How do I pick a new point in one space and interpolate what the point will be in the other space?
In the general case, you do not do that. Take two rectangular sheets of rubber the same size. There is obviously a one to one...

3 years ago | 0

Answered
Getting the error Unable to convert 'tf' to 'sym'
cs=((k)*(double(tau)*s+1))/s

3 years ago | 0

Answered
How is this even logical?
When inserted at position 1 in y However, assigning to y(1,:) is not asking to insert at "position 1" -- the vector is length 3...

3 years ago | 0

Answered
data assingment issue in parfor loop
A=ones(10,10); parfor idx=1:1:10 Arow = A(idx, :) ; numberIdx=2:2:8; Arow(numberIdx)=0; A(idx, :) = Aro...

3 years ago | 1

| accepted

Load more