Answered
How to plot the Eular Transformation?
num = [1 2]; den = [1 2 3 4]; Qc = tf(num,den); ts = 0.1; % Sampling time Qd_zoh = c2d(Qc,ts,'zoh') % Continuous - to -...

3 years ago | 0

Answered
Slow communication speed with Arduino
Note that in Arduino IDE: delay() command does not give a fixed sampling time. You had better use: millis() You can also try ...

3 years ago | 1

Answered
icon on simulink 2022b is enlarged and blurred.
Command: >> preferences Go to Preferences -> Simulink -> Open Simulink Preferences Make all adjustments ...

3 years ago | 0

Answered
Open a file in a program or application and save in another format
You can try with the following functions to save image data - saveas() in an image file and open in MS applications using winope...

3 years ago | 1

Answered
how do I draw the peak of a 2D shape in one dimension, which is the imagesc code?
For your data: 50 gives a good estimate The mean and standard deviation (threshold) values can be computed from your calculated...

3 years ago | 0

Answered
Approximate sum with Euler's contant
You may also try a symbolic math TB's function syms and solve(), e.g.: syms x Solution = solve(pi-sin(x)==1, x) Solution_valu...

3 years ago | 0

Answered
How can I AUTOMATICALLY tune PID controller to get a certain overshoot and settling time?
Try: pidtuner() See good help: https://www.mathworks.com/help/control/ref/pidtuner.html Also, you can try a pid tuner app: h...

3 years ago | 0

Answered
uiaxes title disappears when using plot(ax, ...) after cla(ax,'reset')
Here is your corrected code that contains two lines are repeated for once more on lines 263 and 264: px.Title.String = "Titrat...

3 years ago | 1

| accepted

Answered
Plotting multiple data on one graph and plotting the average of all the files on the same graph.
Here is your code with some corrections by presuming that the size of y1 is the same from all data files: ... for j...

3 years ago | 0

Answered
How can I do FFT of EEG
If I have understood your question correctly, you want to put limitations along y-axis. If so, you can use one of these two opti...

3 years ago | 0

Answered
How quarter car modeling on MATLAB?
Hi, Your system equation is: M*ddx+C*dx+K*x = F(t) and you are studying a forced vibration. There are a few different ways h...

3 years ago | 0

Answered
I want Huffman coding
Have you visited to this doc: Encode sequence of symbols by Huffman encoding - MATLAB huffmanenco (mathworks.com)

3 years ago | 0

Answered
plotting a line graph
Here is a list of steps how you can write a short code to get your assignment done: (1) A user input entry with input() (2) Wr...

3 years ago | 0

Answered
Why am I getting invalid file identifier error?
Hi, I would check the directory address is correct. And if it is correct, then if MATLAB is reading it correctly. name = {'...

3 years ago | 0

Answered
Generate Circles in 500x500 pixel Spectrum
% Use: linspace() % Use: meshgrid() % Use: sin(), cos() % Plot using: pcolor()

3 years ago | 0

Answered
removing ticks on top and right axes
Here is one easy solution to manipulate ticks, e.g.: x = linspace(0,pi); y = sin(x.^2); plot(x,y), grid on yticks([ ]) xtic...

3 years ago | 0

Answered
Getting Complex number from a function
Here is the corrected code: dim = 100; %create 100x100 array a = linspace(-1, 1, dim); b = linspace(-1, 1, dim); [ax, by] =...

3 years ago | 0

| accepted

Answered
How to plot time-spatial distribution of the data?
For this exercise, it is better to use one of the following functions: imagesc() contourf()

3 years ago | 0

Answered
How to minimize the white space from boxchart in MATLAB?
Why not to use saveas(), e.g.: ... saveas(t,'boxPlot0.jpg')

3 years ago | 0

Answered
Convert whole numbers to decimals
One easy to display option after reading your data which are whole numbers is using /* operations, e.g.: A = [0, 90, 9, 224; 33...

3 years ago | 0

Answered
How to give colorbar to a tif image in Matlab
Have tried this syntax: [X,Cmap]= imread('IMAGE.tif'); image(X); colormap(Cmap);

3 years ago | 0

Answered
Rendering human avatar using forward velocity and turning rate inputs
It depends what you wish to achieve. Just human walking kinematics and dynamics can be modeled in Simulink using Simscape toolbo...

3 years ago | 0

Answered
exponential notation used for uislider Major Tick Mark Labels
How about this way of scaling: How about defining ticks and tick labels, e.g.: fig = uifigure; S = uislider(fig); S.Limits =...

3 years ago | 0

Answered
How do I plot the derivative of a function?
It is very simple, e.g.: x = [-3, -2.5 -2 -1 0 1 2 3]; y= sin(2*x); plot(x, y)

3 years ago | 0

Answered
How do I retore the menu of an undocked Command Window?
Click on [Three Column] from the Layout drop down option and then you will get Folder and Workspace in two sideway windows. ...

3 years ago | 0

Answered
How do I plot the derivative of a function?
To plot sin(2*x), e.g.: syms x fplot(x, sin(2*x), [-pi, pi]), grid on xlabel('x'), ylabel('sin(2*x)') Apply this exercise fo...

3 years ago | 0

Answered
How to change font size and location in a mask icon?
You can try gtext() or text(), e.g.: gtext(['This is awesone ' date], 'fontsize', 15, 'backgroundcolor', 'y') %% OR text(1, 1...

3 years ago | 0

Answered
About solving state space equation (mass, spring, damper)
(1) Derive the equation of motion that will be 2nd order Differential equations (2) Transform the derived equations into the La...

3 years ago | 0

| accepted

Answered
How do I plot the derivative of a function?
Use syms and fplot(), e.g.: syms x fplot()

3 years ago | 0

Answered
can someone check my code?
Here is the corrected code: A=randi([0, 111], 1826, 3600); S=1:720; P= zeros(1826, 3600); for i=1:1826 for j=1:3600 ...

3 years ago | 0

Load more