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...

5 years 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...

5 years 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

5 years 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...

5 years 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...

5 years 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...

5 years ago | 0

| accepted

Submitted


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

5 years ago | 1 download |

5.0 / 5
Thumbnail

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...

5 years 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...

5 years 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...

5 years 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 ...

5 years 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()...

5 years 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 :...

5 years 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 ...

5 years 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...

5 years 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 ...

5 years 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...

5 years ago | 1

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...

5 years ago | 1

| 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...

5 years 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 ...

5 years 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...

5 years ago | 1

| 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...

5 years ago | 0

| accepted

Answered
title for displaying multiple images using montage function
> Is it possible to add title to four images that are displayed using montage? No. Image data are combined into a single image...

5 years ago | 1

Answered
How to extract value from matrix and add a constant repeatedly?
Take the cumulative sum of y from right to left after adding 2 to the end: x = 2; % scalar y = [1 3 2 7 8]; % row vector z = ...

5 years ago | 0

| accepted

Answered
Question on how to delete the data (outliers) in the boxplot
> how to eliminate the representation of outliers in a boxplot representation. Removing outliers from the raw data By default,...

5 years ago | 2

| accepted

Answered
Creating a bar plot from a categorical subarray
idx = 7:10; bar(categorical(samples(idx)), rq(idx)) If you want to eliminate categories with a bar height of 0, idx = rq~=0...

5 years ago | 0

| accepted

Answered
How to incorporate multiple IF conditions to generate noisy data?
No need for a loop at all. noise = 1.5*(n>1) + -.5*(n<0) However, in your example, n is always between 0 and 1. Demo rn...

5 years ago | 0

| accepted

Answered
Mixed anova design function (unbalanced design)
Disclaimer: I'm not an expert in statistical test selection and have met very few experts on this matter. Test selection should...

5 years ago | 1

| accepted

Answered
How to plot the vector relative black point to red point
Your [x,y] coordinates are not paired so step 1 is to find the values in black ('k') that are closest to red ('r') (or vise vers...

5 years ago | 1

| accepted

Answered
Using dendrogram in App Designer
How to call an external plotting function without an axes argument in AppDesigner When calling an external plotting function fr...

5 years ago | 3

| accepted

Load more