Community Profile

photo

Cameron B


Last seen: Today
42 total contributions since 2019

Cameron B's Badges

  • Knowledgeable Level 2
  • First Answer

View details...

Contributions in
View by

Answered
Copy parameters from UIAxes to other Axes in external figure app designer
Check Adam Dana’s answer in the link below to get started https://www.mathworks.com/matlabcentral/answers/281318-how-can-i-sav...

11 days ago | 0

| accepted

Answered
How to use savefig in app-designer?
I’d use the function created by Adam Danz found on https://www.mathworks.com/matlabcentral/answers/281318-how-can-i-save-a-figur...

11 days ago | 1

| accepted

Answered
Graphing multiple graphs in one figure
%Use hold on and hold off clear clc xx=transpose(1:10); hold on for hh = 1:6 randvec...

21 days ago | 0

Answered
How to generate and plot a 3D structured mesh in MATLAB?
I’m not sure what all you wanted to do. Is this what you were looking for? clear clc W=8; % Width ...

23 days ago | 0

Answered
How can I create a 3D plot by using the surf?
You could get better resolution if you had more points in your var_disp and ave_disp vectors. I suppose you could interpolate, b...

23 days ago | 0

| accepted

Answered
Invalid syntax at num2str. A'(' might be missing a closing ')'
disp([' (a) tanh(e)=',num2str(tanh(exp(1)))])

25 days ago | 0

Answered
2D plots : Hovering and index information
https://www.mathworks.com/matlabcentral/answers/497552-hi-when-you-create-a-plot-and-hover-over-a-data-point-without-pressing-an...

28 days ago | 0

| accepted

Answered
How to move y-axis number on the left side ?
ax = gca; ax.YAxisLocation = "left";

29 days ago | 0

| accepted

Answered
how to add a new entry for legend while running a multiple plot
x=1:10; hold on for ii=1:3 y=ii.*x; fig1 = plot(x,y); legvec{ii} = sprintf('plot for run %d',ii); end legend(...

29 days ago | 0

| accepted

Answered
Not enough input arguments
Is this what you mean? y = 2*cos(2*pi*((f1+f2)/2)*t)*cos(2*pi*((f1-f2)/2)*t);

30 days ago | 0

| accepted

Answered
How to combine two variables in a table
You should rename your value called mean as something that is not already a function name. meanval = {1,2,3,4,5,6,7,...

30 days ago | 0

Answered
how do I write variance in percentage?
You would probably use the coefficient of variation. Coefficient of variation is the standard deviation divided by the mean and ...

1 month ago | 0

Answered
x greater than y by some value
if x - y > 10 disp(’greater than 10’) else disp(‘less than or equal to 10’) end

1 month ago | 0

| accepted

Answered
Limiting mouseclick event to current Axes in App Designer
Find the pixel locations where you want the function to activate. If it’s a rectangle, then that’s easier. You’ll have four poin...

1 month ago | 0

| accepted

Answered
How to merge several 2D plots and make a single 3D plot if vector lengths are not same.
Can you provide some of your data? That way, we could get a better idea of the min/max values for x and y and determine if inter...

1 month ago | 0

Answered
Calculate area under curve of multiple peaks
Not the most robust code, but it will work for what you have. You will need to check your findpeaks function to make sure it's o...

1 month ago | 0

Answered
how to solve a system of non linear-equations
I ran the code below and some different versions of vpasolve, but I still got the same answer: no solution. So I have to think t...

1 month ago | 0

Answered
Issue with Switch state in AppDesigner
function VioletSwitchValueChanged(app, event) value = app.VioletSwitch.Value if strcmpi(value,'On') ==...

1 month ago | 0

Answered
definite integral not giving exact answer
I don't know what the issue is. I did this and got 8*r/5. The answer seems to be correct. syms r sym(-r*(cos(175787564848171/7...

1 month ago | 0

Answered
Trying to create two arrays called z and y
First I would rename the variable i as ii so it’s not confused with the more general use of i = sqrt(-1). To save the variable, ...

1 month ago | 0

| accepted

Answered
How can I automatically select two points in a plot?
Select them as in producing data tips? If that's the case, then see the code below. If not, then please explain what you'd like ...

1 month ago | 0

Answered
How to use 'CancelRequested' property for a progress bar?
fig = uifigure; dlg = uiprogressdlg(fig,'Title','Wait',... 'Message','Starting','Cancelable','on','CancelText','Stop this'...

1 month ago | 0

| accepted

Answered
How to use 'CancelRequested' property for a progress bar?
progressbar = waitbar(0,'Determining optimum slope','CreateCancelBtn','setappdata(gcbf,''Cancel'',1)'); wholeRandNum = 215; fo...

1 month ago | 0

Answered
forbid the switch of tab group in app designer while running a calculation
It doesn't look as if I can attach my mlapp file so I'll paste the relevant code here and let you put it together. When you hit ...

1 month ago | 1

Answered
How do I return callback value from GUI to workspace
Let’s say the variable you want to send to the workspace is called savethis in your GUI, and let’s say you want the variable in ...

1 month ago | 0

| accepted

Answered
Problem of measure unit conversion
https://www.mathworks.com/matlabcentral/fileexchange/4093-units-m?focused=5053365&tab=function This is what I use. You can ad...

1 month ago | 0

| accepted

Answered
How to delete a matrix using for loop and if condition?
clear clc MA1 = ones(3); MA2 = MA1*2; MA3 = MA1*3; MA4 = MA1*4; MA5 = MA1*5; MB...

1 month ago | 0

Answered
App Designer - ListBox Tooltip for too long entries not there any more in 2019b
How did you originally get the tooltip to specify only the line you're hovering on in 2018a? The only way I know is to use mouse...

1 month ago | 0

Answered
Solving an equation and using the answer for other equations
w = 8.37; L = 30; h = 6.5; theta = 12; N = L/2 + h/tand(theta); syms m eqn = m^2/(2*w) + m*(5*N/3 - L/3) + w*L^2/8; M = ...

1 month ago | 1

| accepted

Answered
Solve the following system of non-linear equations
syms x y z eqn1 = x*y*z - x^2 +y^2 - 1.34; eqn2 = x*y - z^2 - 0.09; eqn3 = exp(x) - exp(y) + z - 0.41; sol = vpasolve(eqn1,e...

1 month ago | 0

Load more