Answered
How can I add automated "new line" within a xlabel (too long lable text shall not exceed the subplot width).
You can try this method. The idea is very similar to what you had, but this approach sets the xlabel 'String' and keeps track of...

4 years ago | 0

Answered
how to remove uncertainty from data in order to plot it
str = "2.19479E-8 ± 2.46286E-10"; % to get a new string with just the first value: new_str = extractBefore(str," ±") % or t...

4 years ago | 0

Answered
App Designer Text box response problem
If I understand the situation, it sounds like you have to have the external program execute the Callback function of box A immed...

4 years ago | 0

Answered
Determine intercept of two Lines
You can do another interpolation (actually two interpolations), splitting the curve into two parts: before the peak and after th...

4 years ago | 1

| accepted

Answered
plot a surface inside a circle of radius R
You can set the elements of T beyond a certain distance from the origin (i.e., the center of the circle) to NaN so they don't sh...

4 years ago | 0

| accepted

Answered
Trying to remove Nans when plotting histogram, pdf and cdf
I think you basically have it right. I just "fixed" a syntax error on the line where you call histogram(). ("fixed" is in quotes...

4 years ago | 0

| accepted

Answered
How to connect individual scatter points across grouped bars?
Here's an example with non-realistic data (because I didn't feel like reverse engineering and reproducing the code you ran to ge...

4 years ago | 0

| accepted

Answered
Color the the image
First of all, let me say Go Coogs. Second, here's some code you can use. This works from the input image provided, i.e., it fir...

4 years ago | 0

| accepted

Answered
Greetings dear friends, I am trying to graph this integral so that I can obtain a graph x =f(t), thanks for your help!
Note that t > 0 and the grids on the surface in the desired image are more widely spaced than the actual points where the surfac...

4 years ago | 0

| accepted

Answered
Nth term of a Leibniz Series
It depends on if the first term should correspond to input N == 0 or input N == 1. If it's N == 0, I think it's ok how you have ...

4 years ago | 0

| accepted

Answered
How can I change axis font size only in a figure?
clear clc close all x=linspace(0,4*pi,10); y=x.^2.*sin(x); f1=figure; f1.Units='centimeters'; f1.Position = [30 30 100 ...

4 years ago | 1

| accepted

Answered
Why is one of my subplots being deleted?
The problem: only one axes was created figure; ax1 = subplot(2,1,1,'Position', [0.05, 0.3, 0.92, 0.64]); ax2 = subplot(2,1,2,...

4 years ago | 0

Answered
How to add values into specific part of a zero vector
res=zeros(151001,1); flagstart = [11600 42410 72480 102100 132000]; flagend = [22620 52410 82550 112900 142200]; for ii = 1...

4 years ago | 0

| accepted

Answered
Cannot find an exact (case-sensitive) match for 'lbp'
MATLAB is case-sensitive, so lbp and Lbp would refer to two different functions/variables. The error message is saying essential...

4 years ago | 1

| accepted

Answered
How to plot constant vertical line based on the input value in app designer?
Here's an illustration: % recreating your blue line: figure() plot([1 2],[1 2],'LineWidth',3); % get this frequency value ...

4 years ago | 1

| accepted

Answered
How can I put the symbol of % in colorbar?
Like this: figure(); cb = colorbar(); ylabel(cb,'%') Or maybe like this: figure(); cb = colorbar(); set(get(cb,'YLabel'),...

4 years ago | 0

| accepted

Answered
How to merge two lists of files?
list_1 = dir(); list_2 = dir(); combined_list = [list_1; list_2]; disp(list_1); disp(list_2); disp(combined_list);

4 years ago | 1

| accepted

Answered
How to plot (over one figure) one variable from each table located in 20 diffrent folders?
% List all folders topLevelFolder = pwd; files = dir(topLevelFolder); % Get a list of folders in this folder. dirFlags...

4 years ago | 1

| accepted

Answered
Plotting Multiple Box plot in same graph same x axis
Maybe something like this? colors = 'rgbym'; for ii = 1:5 x1 = rand(5,1); x2 = rand(10,1); x3 = rand(15...

4 years ago | 0

| accepted

Answered
scatter plot different colors and markers based on different variables
You can do a separate gscatter plot for each "type" (column 7 value). Something like this: data= readtable('RKP glass - MIs dat...

4 years ago | 0

Answered
loop in a loop
figure(); n = 100; t = linspace(0,1,n); dt = t(2); f = @some_function; g = @some_function; B = randn(1,100); hold on; ...

4 years ago | 0

Answered
Simulating 10 biased coin flips 100 times
rand(0,1) returns a 0-by-1 array. rand() returns a (uniformly distributed) random number between 0 and 1. See other changes be...

4 years ago | 1

| accepted

Answered
How to end an indefinite loop?
I'm not sure if this is what you're going for, but now the loop terminates. The only difference is now the code updates elements...

4 years ago | 0

| accepted

Answered
How to skip inputs in a function?
If you mean that you want to be able to call the function with on or the other of two different sets of input arguments, one set...

4 years ago | 0

Answered
Making xticks match yticks?
You can do this: set(gca(),'XTick',get(gca(),'YTick')); For example: plot(1:10,5:14); % plot a line set(gca(),'XTick',get(gc...

4 years ago | 0

| accepted

Answered
How can I get the upper triangular matrix without using triu()?
You can set all elements below the main diagonal to zero, e.g., using a for loop: % A matrix, pick any size you want: A = rand...

4 years ago | 0

Answered
Trying to get all values for corresponding columns
Hard to say for sure without the pdf file, but maybe something like this will work: clear str = extractFileText("data-01.pdf")...

4 years ago | 0

| accepted

Answered
How do I store user input values from a for loop into a matrix for summation.
How about this? ammBooks = input('How many textbooks will you be purchesing today? '); while ammBooks <= 0 || mod(ammBooks,1) ...

4 years ago | 0

| accepted

Answered
How do I add a key to my plot?
To add a key showing which line is which, you can use legend(). To ensure the same x- and y-scale, you can use axis equal. fig...

4 years ago | 0

| accepted

Answered
Put various buttons in a figure to toggle figures or print/save ONLY the figure parts. Will export_fig() work?? (using GUIDE)
I think GUIDE would be a perfectly fine way to do this. I'm not familiar with export_fig, etc., but you can use the built-in pr...

4 years ago | 1

| accepted

Load more