Respondida
Plot symbolic function and non symbolic functions on the same plot?
Here is a simple example: figure fplot(@(x) sin(x), [-pi, pi]) hold on x = linspace(-pi, pi, 25); plot(x, sin(x), 'rd') le...

más de 4 años hace | 0

Respondida
How to use imwrite with image object?
You can try this command, e.g.: imwrite(double(im),filename)

más de 4 años hace | 0

Respondida
Sharing MATlab codes (.m files)
Have you read this nice discussion on this subject written by Loren: https://blogs.mathworks.com/loren/2021/07/15/sharing-and-r...

más de 4 años hace | 0

Respondida
How do I smooth a curve on a surf plot?
You can try smoothdata() with Gaussian, e.g.: X = load('DFF_vals.mat'); Y = load('ZFF_vals.mat'); Z = load('Fin.mat'); Zsmoo...

más de 4 años hace | 0

Respondida
HELP: Index in position 2 is invalid. Array indices must be positive integers or logical values.
Your fcn file straighten.m that contains one crucial mistake, i.e.: The command in it on line 10 has a conflict: IM2(:,:,ct)=...

más de 4 años hace | 0

Respondida
How to create for loop for more than 1 file in path?
You exercise can be solved using a simple for loop, e.g.: G = ["C:\...\ANOVA.xlsx"; "C:\...\Data.xlsx"; "C:\...\DAT1...

más de 4 años hace | 0

Respondida
assigning element in 3D matrix
First of all, you need to close the loops with "end" in your code, i.e.: nz =3; nx=2; ny=3; Tz_D = zeros(nx,ny,nz); mobil...

más de 4 años hace | 0

| aceptada

Respondida
How can I solve the italicized equation for the matrix gamma_e, gamma_s and d1 ?
By a quick glance, one sees that there are a couple of points to be fixed in the 2nd loop, i.e.: ... for didx1 = 1:num_d1 ...

más de 4 años hace | 0

Respondida
cosine estimate taylor series
Here is the corrected code: ang = '045-00-00'; k = 2; res = cosineEstimate(ang, k) function res = cosineEstimate(ang, k) ...

más de 4 años hace | 0

Respondida
Mass Spring System ode45 with multiple damping values
It is realtively easy to attain the issues of solving the exercises for all damping values and plot them all with appropriate le...

más de 4 años hace | 0

| aceptada

Respondida
Arduino Support Package not installing after installation
Have you tried to hook up Arduino board to your computer via USB to see if your MATALB package shows up a message saying "Arduin...

más de 4 años hace | 0

Respondida
Signal generation on Simulink?
This modulation signal can be generated using the following Simulink model and/or this M-ffile: fs = 5000; ...

más de 4 años hace | 0

Respondida
Can you both exclude outliers from a fit and use robust weighting for the remaining data?
In your exercise, if it is known which part to include in the fit simulation and which part to exclude, then you can use just ap...

más de 4 años hace | 1

Respondida
Can MATLAB save the Profiler results table (Function Name, Calls, etc.) to a text file or a spreadsheet?
You can try this fcn - extracthmltext() to extract the data from html formatted file: https://www.mathworks.com/help/textanalyt...

más de 4 años hace | 0

Respondida
How to distinguish specific nodes in an undirected graph ?
Here one potential err in your code is logical (==). One can determine when the value of a variable goes to infinity with this f...

más de 4 años hace | 0

Respondida
Can MATLAB save the Profiler results table (Function Name, Calls, etc.) to a text file or a spreadsheet?
Yes, it can be done realtively easy with profsave(profile()), e.g.: profile on x = linspace(0, 1, 2e3); y = sin(2...

más de 4 años hace | 0

Respondida
Error when importing STL file into Matlab
If you want to create a geometry using some edge coordinates, then hit this help: doc geometryFromEdges % Explains via a good s...

más de 4 años hace | 0

| aceptada

Respondida
How can I load all these images using a for loop
It can be achieved something like this one: for ii = 1:55 FN = strcat('VIV_frames\ezgif-frame-',num2str(ii), '.jpg'); ...

más de 4 años hace | 0

| aceptada

Respondida
How do I make tick marks longer?
Use these, e.g.: plot(x, y); ax=gca; ax.TickLength = [0.05 0.05]; shg

más de 4 años hace | 0

| aceptada

Respondida
Error when importing STL file into Matlab
You are missing one important part in your command, see e.g.: pdem = createpde(); % Missing GM = importGe...

más de 4 años hace | 0

Respondida
IIR Band Pass Filter Design for Signal Noise Cancellation
This is quite stratightforward issue. You can design a band-pass filter using the help given here: https://www.mathworks.com/hel...

más de 4 años hace | 0

| aceptada

Respondida
Error when running run section
In general, executing the cell modes of scripts is more sensitive on syntax errors made in other sections sections of the code. ...

más de 4 años hace | 0

| aceptada

Respondida
Optimization of transfer function
Hi, There are two realtively easy ways to obtain those parameters' estimate values. (1) Using system identification toolbox...

más de 4 años hace | 0

Respondida
how to substitute symbolic equation into symbolic equation, and to reorganize symbolic equations
There are a couple of points in the code to be corrected and then you can get an analytical solution expressed in terms of other...

más de 4 años hace | 0

Respondida
Is it possible to get multiple 0s from fzero?
In your exercise, ie. a polynomial, the first try is roots() and then fzero() with different intervals can be an option for real...

más de 4 años hace | 0

| aceptada

Respondida
How to delete more than one point from data array in loop?
If understood your question and you want to delete specific data rows, then you had better step your code somewhat in this manne...

más de 4 años hace | 1

Respondida
Export certain cells of a structure into a table (.csv file)
One quick solution with your large data to separate them and write to an external file is the following in the example of two fi...

más de 4 años hace | 0

| aceptada

Respondida
how to plot this equation ?
Here you'd need to define the purpose of using GF. If you are aiming to select any randomly selected values of GF while comput...

más de 4 años hace | 0

| aceptada

Respondida
Curve Fitting an equation
You can try using a rational polynomial fit in this exercise if the variable x is also present in the denominator.

más de 4 años hace | 0

Respondida
How to add a .png image to be published as a pdf output file
% Use a proper image read command: image(imread('https://www.mathworks.com/help/examples/matlab/win64/ReadandDisplayImageExampl...

más de 4 años hace | 0

Cargar más