Answered
how to creat column vector which has 100 evenly spaced entries?
See linspace() https://www.mathworks.com/help/matlab/ref/linspace.html and logspace() https://www.mathworks.com/help/matlab/ref...

6 years ago | 1

Answered
Adding row to matrix in a loop
If and only if the matrices have the same number of columns, you can concatenate two matrices vertically using, M = [m1; m2]; ...

6 years ago | 1

| accepted

Answered
Error: Function definitions are not permitted in this context
Starting in r2016b, functions can be defined within scripts but they must end with the end keyword. For more information: htt...

6 years ago | 0

Answered
variable name with variation
What you're describing is called dynamic variable naming and it should be avoided. Instead, you can store the intended variable...

6 years ago | 1

| accepted

Answered
I have switched from matlab 2016 to matlab 2020a.
Try running this popular file exchange function. Follow the instructions provided. https://www.mathworks.com/matlabcen...

6 years ago | 0

| accepted

Answered
How do I change the header name of csv files?
When you write the csv file, there are no headers using the syntax you shared. The Var1 Var2.... headers appear when you read t...

6 years ago | 1

| accepted

Answered
Additive white gaussian noise
Here: https://www.mathworks.com/help/comm/ug/awgn-channel.html#a1071501088

6 years ago | 0

| accepted

Answered
Finding the x value for a given y value on a plot
Check out the 2nd output to findpeaks, it gives you the x-values. [pks,locs] = findpeaks(data) <--link Check out the gradien...

6 years ago | 0

Answered
Display small images on certain x and y (coordinates)
Check out the documentation for image(x,y,C) In short, you need to calculate the [x1,x2], [y1,y2] coordinates where (x1,y1) is ...

6 years ago | 1

| accepted

Answered
Create a map with 3 different variables
Plotting bivariate binned means using heatmap % Compute binned mean [N,~,~,binX,binY] = histcounts2(RPM, Throttle, binEdgesRPM...

6 years ago | 0

| accepted

Answered
Grid line not showing for y-axis
I could not recreate the problem. Try box on % or box(axisHandle, 'on')

6 years ago | 1

| accepted

Answered
Unrecognized function or variable 'x'.
You need to define the input variables. You cannot simply run a function that has undefined input variables. x = 45 n = 8 T...

6 years ago | 0

| accepted

Answered
How to combine 4 columns of a table into one new variable and plot it with respect to time?
Example: plot(T.Var1, [T.Var2, T.Var3, T.Var4, T.Var5]) If you need to select certain rows, idx = T.Var1 > x1 & T.Var1 < x2;...

6 years ago | 0

| accepted

Answered
Limit y-line in x-axis
To shift data to the right, you just need to add a constant value to all x-coordinates. To shift data to the left, you just n...

6 years ago | 0

Answered
Write a function called draw_constellations that takes no input arguments and returns no output arguments. Instead, it obtains its input via the function ginput.
Create the line object prior to the while-loop using NaN values for the x and y data. Then update the x and y data within the l...

6 years ago | 0

| accepted

Answered
How to change the line thickness inside the legend box ?
The line properties of the legend components cannot be changes independently from the line objects they represent in the plot. ...

6 years ago | 3

| accepted

Answered
Can I use regionprops for two different image for finding same feature in same code?
You're indexing the wrong variable. xnewCentroid = props1(1).Centroid ynewCentroid = props1(1).Centroid See this example to...

6 years ago | 0

| accepted

Answered
Assigning values from one array to another if certain specifications are met.
Inputs: A= [ 0 1 2 3 6 8 9 10 0 0 0 0 0 0 0 0 0 0 0 ...

6 years ago | 0

| accepted

Answered
How can I update the polar plot in GUI?
When you create the polarplot, store the handle to each graphics object you plot. Then update the ThetaData and RData propertie...

6 years ago | 0

| accepted

Answered
How to store values from a loop in a matrix
Pre-allocate your loop variable according to the number of loops and the length of the variable being stored. Here's an example...

6 years ago | 0

Answered
How to rotate graph?
ax = gca(); ax.XDir = 'reverse'; % or ax.YDir = 'reverse'; To flip the data vertically rather than the axes, scatter(...

6 years ago | 0

| accepted

Answered
How to find significance of correlation coefficients?
The 2nd output to corr() gives you the p-value. You just need to save those values. [rxy(i,j),sxy(i,j)] = corr(squeeze(t(i,j...

6 years ago | 0

| accepted

Answered
Need help to translate Lat/long as signed 32bit integer to decimal degrees.
dms2degrees() degrees2dms() degrees2dm() dm2degrees() and hex2dec()

6 years ago | 0

Answered
How to set UIAxes min and max lim for plot in app designer ?
It looks like what you want to do is axis(app.UIAxes, 'tight') Your current code does not give you the minimum of all plotted...

6 years ago | 2

| accepted

Discussion


New in r2020a: functions to analyze timetable ranges
Do date ranges from two different timetables intersect? Is a specific datetime value within the range of a timetable? Is ...

6 years ago | 10

Answered
How to get the same pixel points in an image using Euclidean Distance when the image is scaled up or down?
Think of the line that connects two points P & Q as the hypotenuse of a right triangle where the length of leg-1 is the x-distan...

6 years ago | 0

| accepted

Answered
Why does using normxcorr2 slow down my code seriously?
The normxcorr2 function is the bottleneck of processing speed in your code consuming 49% of the total processing time however, y...

6 years ago | 1

| accepted

Answered
Change font size in column headings in App table
As of r2020a, the fontsize of VariableNames and RowNames cannot be altered. However, the r2020a release includes a larger an...

6 years ago | 5

Answered
How can i change the colours of segmentation on a chart pie?
Unforunately the pie() function does not allow you to directly specify the face color of each wedge as inputs. Here are two wa...

6 years ago | 4

| accepted

Answered
How to plot pie chart in Matlab GUI using buttons?
Hint: "Labels" is not the same as "labels". Variable names are case sensitive.

6 years ago | 0

| accepted

Load more