Answered

Cannot share my MATLAB online files to others.

Place the shared content within a folder and share the folder. https://www.mathworks.com/help/matlabdrive/ug/share-and-collabo...

Cannot share my MATLAB online files to others.

Place the shared content within a folder and share the folder. https://www.mathworks.com/help/matlabdrive/ug/share-and-collabo...

7 dagar ago | 0

| accepted

Answered

Count number of values of a Matrix inside a range and plot it

bins = [0,3,4,5,15]; h = histogram(B(:),bins); To get the counts within each bin, h.Values

Count number of values of a Matrix inside a range and plot it

bins = [0,3,4,5,15]; h = histogram(B(:),bins); To get the counts within each bin, h.Values

7 dagar ago | 0

| accepted

Answered

How to calculate the number of times the values of a column changes

This demo matches your 2nd example. This temporarily breaks up the table into sub-tables based on the ID and loops through eac...

How to calculate the number of times the values of a column changes

This demo matches your 2nd example. This temporarily breaks up the table into sub-tables based on the ID and loops through eac...

8 dagar ago | 0

| accepted

Answered

How to declare a global variable in Startup function of matlab app.designer

Do not use global variables, especially in AppDesigner. Instead, declare a public or private property accessible anywhere wit...

How to declare a global variable in Startup function of matlab app.designer

Do not use global variables, especially in AppDesigner. Instead, declare a public or private property accessible anywhere wit...

8 dagar ago | 0

| accepted

Answered

Create table from data

Summary of comments under the question, Instead of initializing T as an empty cell, use an empty table. T = table(); A1 = ...

Create table from data

Summary of comments under the question, Instead of initializing T as an empty cell, use an empty table. T = table(); A1 = ...

8 dagar ago | 0

| accepted

Answered

Compare for uniqueness between 2 very large matrices

To determine if two arrays are 100% identical, use isequal or isequaln to ignore NaN values. To determine if columns in matri...

Compare for uniqueness between 2 very large matrices

To determine if two arrays are 100% identical, use isequal or isequaln to ignore NaN values. To determine if columns in matri...

8 dagar ago | 0

Answered

Plotting random points within Boundary

If you have the perimeter coordinates, you can create a bunch of random numbers and then eliminate the ones outside of the perim...

Plotting random points within Boundary

If you have the perimeter coordinates, you can create a bunch of random numbers and then eliminate the ones outside of the perim...

8 dagar ago | 0

Answered

I can't randomly distribute the dots

> I want you to be like the image of a building collapsed in an earthquake. Height points scatter all over the x and y axes Wha...

I can't randomly distribute the dots

> I want you to be like the image of a building collapsed in an earthquake. Height points scatter all over the x and y axes Wha...

8 dagar ago | 0

Answered

ignore NaN values in loop

The image below shows the location of your missing values. The good news is that the missing values either consume entire colum...

ignore NaN values in loop

The image below shows the location of your missing values. The good news is that the missing values either consume entire colum...

9 dagar ago | 0

Answered

How to change columns width in uitable

Set multiple rows of ColumnName strings, uit.ColumnName{3} = sprintf('Product\nEmissions\n(Kg CO2eq)\n'); % uit is the uita...

How to change columns width in uitable

Set multiple rows of ColumnName strings, uit.ColumnName{3} = sprintf('Product\nEmissions\n(Kg CO2eq)\n'); % uit is the uita...

9 dagar ago | 0

Answered

prompt user to reenter function

See examples, Use a wrapper fcn to re-prompt user if input is empty Input must be 1 letter Input must be Yes|No

prompt user to reenter function

See examples, Use a wrapper fcn to re-prompt user if input is empty Input must be 1 letter Input must be Yes|No

9 dagar ago | 0

Answered

How can I change elevation data in point cloud

Extract (x,y,z) coordinates from the pointCloud object (ptCloud.Location), make changes to the coordinates, and then reassign to...

How can I change elevation data in point cloud

Extract (x,y,z) coordinates from the pointCloud object (ptCloud.Location), make changes to the coordinates, and then reassign to...

9 dagar ago | 0

Answered

plot graph from cell array

This is the result I get and the plots are clearly different (the shape and the y-axis-limit). For comparison, equate the axi...

plot graph from cell array

This is the result I get and the plots are clearly different (the shape and the y-axis-limit). For comparison, equate the axi...

9 dagar ago | 0

| accepted

Answered

Reading cell array from excel table, which contains different sizes of doubles

There might be a smoother method but this works with the data from your image. file = 'Book1.xlsx'; opts = detectImportOptio...

Reading cell array from excel table, which contains different sizes of doubles

There might be a smoother method but this works with the data from your image. file = 'Book1.xlsx'; opts = detectImportOptio...

10 dagar ago | 0

| accepted

Submitted

rectangle2

Similar to Matlab's rectangle() but with more options.

10 dagar ago | 8 downloads |

Answered

Draw rotated rectangle with rounded edge

I created a function to extend the capabilities of Matlab's rectangle() but with these additional features: Position rectangle...

Draw rotated rectangle with rounded edge

I created a function to extend the capabilities of Matlab's rectangle() but with these additional features: Position rectangle...

12 dagar ago | 1

| accepted

Answered

Display value in plot "Groups Bars"

How to label bar heights for non-stacked bar plots This demo adds labels above each bar. To add the labels at the top but wit...

Display value in plot "Groups Bars"

How to label bar heights for non-stacked bar plots This demo adds labels above each bar. To add the labels at the top but wit...

13 dagar ago | 0

| accepted

Answered

Plot with 2 X Axis. Y Axis blurry

It looks like the y-axis limits do not match between both of the axes. The only reason you're using two axes, as far as I can...

Plot with 2 X Axis. Y Axis blurry

It looks like the y-axis limits do not match between both of the axes. The only reason you're using two axes, as far as I can...

14 dagar ago | 0

| accepted

Answered

Can I use arrows to move Data Tips on scatter plots?

It appears that keyboard control of DataTips is not supported in scatter(). However, a less-than-perfect workaround is to plot ...

Can I use arrows to move Data Tips on scatter plots?

It appears that keyboard control of DataTips is not supported in scatter(). However, a less-than-perfect workaround is to plot ...

14 dagar ago | 1

Answered

How can I combine these two MATLAB codes? (MATLAB)

This should get you started, s=tf('s'); C=5*(1+0.8*s); P=1/(s*(5*s+1)); CL=feedback(C*P,1); figure step(CL) ax = gca()...

How can I combine these two MATLAB codes? (MATLAB)

This should get you started, s=tf('s'); C=5*(1+0.8*s); P=1/(s*(5*s+1)); CL=feedback(C*P,1); figure step(CL) ax = gca()...

14 dagar ago | 0

| accepted

Answered

How do i separate data?

Assuming fs is the sampling frequency in Hz, load('06-11_36.mat') resampleInteval = 20; % seconds dataResampled = data(1 :...

How do i separate data?

Assuming fs is the sampling frequency in Hz, load('06-11_36.mat') resampleInteval = 20; % seconds dataResampled = data(1 :...

14 dagar ago | 0

| accepted

Answered

How to set the max and min value of the colorbar to be displayed on a Heatmap on Matlab 2015

You're using the older HeatMap from the bioinformatics toolbox. Instead, use heatmap which supports caxis(). If you have a ...

How to set the max and min value of the colorbar to be displayed on a Heatmap on Matlab 2015

You're using the older HeatMap from the bioinformatics toolbox. Instead, use heatmap which supports caxis(). If you have a ...

14 dagar ago | 0

| accepted

Answered

How can I put a stopwatch that counts how much time has passed since opening an app?

> I want to measure the time that passes since I open an app Create a timer object in the startup function of the App and start...

How can I put a stopwatch that counts how much time has passed since opening an app?

> I want to measure the time that passes since I open an app Create a timer object in the startup function of the App and start...

14 dagar ago | 0

| accepted

Answered

I wanted to solve temperature profile of a copper pipe but I got an error

T is a column vector of size 201x1. T(i) is a scalar of size 1x1. You're trying to put 201 values in a space for 1 value. I ...

I wanted to solve temperature profile of a copper pipe but I got an error

T is a column vector of size 201x1. T(i) is a scalar of size 1x1. You're trying to put 201 values in a space for 1 value. I ...

15 dagar ago | 1

Answered

How do I plot 2 images, each with a different colormap and CLim in a single subplot?

Colormaps can only be set for a figure or for an axes and an axes can only have 1 colormap. You'll need to create a second axe...

How do I plot 2 images, each with a different colormap and CLim in a single subplot?

Colormaps can only be set for a figure or for an axes and an axes can only have 1 colormap. You'll need to create a second axe...

15 dagar ago | 0

Answered

How to stackedplot in Matlab 2016?

stackedplot was released in r2018b. An alternative is stackedaxes() on the file exchange. The image below compares stackedplo...

How to stackedplot in Matlab 2016?

stackedplot was released in r2018b. An alternative is stackedaxes() on the file exchange. The image below compares stackedplo...

15 dagar ago | 0

| accepted

Answered

struggeling with the quiver function

Given the problem described in my comment above, the easiest solution in my opinion is to replace the arrow with a different mar...

struggeling with the quiver function

Given the problem described in my comment above, the easiest solution in my opinion is to replace the arrow with a different mar...

15 dagar ago | 0

| accepted

Answered

How to plot too many graph in a figure?

Does each line really need its own axis? Why not plot all lines together on 1 axis and just different colors or marker symbols ...

How to plot too many graph in a figure?

Does each line really need its own axis? Why not plot all lines together on 1 axis and just different colors or marker symbols ...

15 dagar ago | 0

Answered

How to plot Specific data points on individual bode plots.

Fq = [5 10 50 100 500 1000]; %Command Frequencies Ar = [0.75472144 0.54075 0.11894 0.054723 0.005801 0.00157]; %Amplitude rat...

How to plot Specific data points on individual bode plots.

Fq = [5 10 50 100 500 1000]; %Command Frequencies Ar = [0.75472144 0.54075 0.11894 0.054723 0.005801 0.00157]; %Amplitude rat...

15 dagar ago | 0

| accepted

Answered

Partial Zoom in subplot function

axes('position', ...) does not zoom into the axes. It sets the position of the axes relative to the figure. To zoom into a s...

Partial Zoom in subplot function

axes('position', ...) does not zoom into the axes. It sets the position of the axes relative to the figure. To zoom into a s...

15 dagar ago | 0

| accepted