回答済み

How do I fit my data to a cos^2?

All I used was the plot function and I got something pretty sinusoidal theta = [90, 110, 130, 135, 150, 170, 180, 190, 210, 225...

How do I fit my data to a cos^2?

All I used was the plot function and I got something pretty sinusoidal theta = [90, 110, 130, 135, 150, 170, 180, 190, 210, 225...

5ヶ月 前 | 0

回答済み

Error using reshape and permute

a 17*11*11 matrix contains 2057 elements, you have 1800.

Error using reshape and permute

a 17*11*11 matrix contains 2057 elements, you have 1800.

5ヶ月 前 | 0

| 採用済み

回答済み

UI push buttons play audio

if you want to create your ui programmatically, check this out: https://www.mathworks.com/help/matlab/ref/uicontrol.html if yo...

UI push buttons play audio

if you want to create your ui programmatically, check this out: https://www.mathworks.com/help/matlab/ref/uicontrol.html if yo...

5ヶ月 前 | 1

| 採用済み

回答済み

Unable to perform two for loops, with a set value from first for loop into second loop

The problem is that your Emax is defined as a 1x3 array. So I think you meant to index your p_limit vector. Heres sort of what ...

Unable to perform two for loops, with a set value from first for loop into second loop

The problem is that your Emax is defined as a 1x3 array. So I think you meant to index your p_limit vector. Heres sort of what ...

5ヶ月 前 | 0

| 採用済み

回答済み

How do I make a smooth curve using the following data?

figure x1 = [0,0.0521,0.1042, 0.1563, 0.2083, 0.2604, 0.3125, 0.3646, 0.4167]; x1q = linspace(x1(1),x1(end),100); y1 = [2.401...

How do I make a smooth curve using the following data?

figure x1 = [0,0.0521,0.1042, 0.1563, 0.2083, 0.2604, 0.3125, 0.3646, 0.4167]; x1q = linspace(x1(1),x1(end),100); y1 = [2.401...

5ヶ月 前 | 1

| 採用済み

回答済み

Plotting two sets of 3D points on same graph

You can plot multiple points on a graph by using the hold on function. take a look: https://www.mathworks.com/help/matlab/re...

Plotting two sets of 3D points on same graph

You can plot multiple points on a graph by using the hold on function. take a look: https://www.mathworks.com/help/matlab/re...

5ヶ月 前 | 1

回答済み

how to make a push button to be pressed 3 times after other push button is pressed ?

You can jsut call out the callback for pushbutton2 three times in your callback for pushbutton1. button1 = uicontrol('style','...

how to make a push button to be pressed 3 times after other push button is pressed ?

You can jsut call out the callback for pushbutton2 three times in your callback for pushbutton1. button1 = uicontrol('style','...

5ヶ月 前 | 1

| 採用済み

回答済み

How to use a vector to make a graph?

https://www.mathworks.com/help/matlab/ref/hold.html https://www.mathworks.com/help/matlab/ref/scatter.html

How to use a vector to make a graph?

https://www.mathworks.com/help/matlab/ref/hold.html https://www.mathworks.com/help/matlab/ref/scatter.html

5ヶ月 前 | 0

回答済み

fill table with data from text box

I am assuming you are using the uitable, you can just directly edit the data on the table by setting the ColumnEditable property...

fill table with data from text box

I am assuming you are using the uitable, you can just directly edit the data on the table by setting the ColumnEditable property...

5ヶ月 前 | 0

| 採用済み

回答済み

System of equations error

syms x y z sol=solve([x==5 ,-6*x+10*y-3*z == 0,-y+51*z==0],[x y z])

System of equations error

syms x y z sol=solve([x==5 ,-6*x+10*y-3*z == 0,-y+51*z==0],[x y z])

5ヶ月 前 | 0

回答済み

Replacing values based on a condition in a matrix.

%let M be your matrix; ind = M(:,2) > 20; %grab indices along second column where value is > 20 M = num2cell(M); % youre going...

Replacing values based on a condition in a matrix.

%let M be your matrix; ind = M(:,2) > 20; %grab indices along second column where value is > 20 M = num2cell(M); % youre going...

5ヶ月 前 | 0

回答済み

I'm trying to plot these points, please help?

x=10:1:110; W=500; L=120; h=50; y=(W*L)*(sqrt((h^2)+(x.^2)))./(h.*x) ; figure plot(x,y) things to note: define the varia...

I'm trying to plot these points, please help?

x=10:1:110; W=500; L=120; h=50; y=(W*L)*(sqrt((h^2)+(x.^2)))./(h.*x) ; figure plot(x,y) things to note: define the varia...

5ヶ月 前 | 0

| 採用済み

回答済み

How to use a loop to get the final result stated in problem

t=2; kr=2; s=[0;0]; R=[2 3; 3 4]; D=[4 5; 5 6]; s1=zeros(kr,t); S = []; for n = 1:100 for i=1:kr for j=1:t ...

How to use a loop to get the final result stated in problem

t=2; kr=2; s=[0;0]; R=[2 3; 3 4]; D=[4 5; 5 6]; s1=zeros(kr,t); S = []; for n = 1:100 for i=1:kr for j=1:t ...

5ヶ月 前 | 0

| 採用済み

回答済み

Is it possible to detect and replace abnormal/wrong numbers in an array?

A = [25.9, 25.9, 26.2, 27, 28, 29, 29.3, 29.6, 3, 30.4, 30.5, 30.4, 30.3, 30.3] abnorm =mean(A) - 3*std(A); % you can set howe...

Is it possible to detect and replace abnormal/wrong numbers in an array?

A = [25.9, 25.9, 26.2, 27, 28, 29, 29.3, 29.6, 3, 30.4, 30.5, 30.4, 30.3, 30.3] abnorm =mean(A) - 3*std(A); % you can set howe...

5ヶ月 前 | 1

| 採用済み

回答済み

Randi except one variable

I would suggest generating a mxn randi matrix, and just changing the one index to whatever value you wanted it to be.

Randi except one variable

I would suggest generating a mxn randi matrix, and just changing the one index to whatever value you wanted it to be.

5ヶ月 前 | 0

回答済み

MATLAB GUI, using guide

The table has a 'Data' property. So you can do something like this: table_handle.Data = data_matrix %or set(table_handle,'Da...

MATLAB GUI, using guide

The table has a 'Data' property. So you can do something like this: table_handle.Data = data_matrix %or set(table_handle,'Da...

5ヶ月 前 | 0

| 採用済み

回答済み

Calling variables from a GUI into a script

The variables are undefined because your graphic objects have lost their handles, because those handles are beyond the scope of ...

Calling variables from a GUI into a script

The variables are undefined because your graphic objects have lost their handles, because those handles are beyond the scope of ...

5ヶ月 前 | 0

回答済み

Big table with zero

for an array, say: a = 1 0 0 1 0 1 1 1 1 0 0 1 you can just do: ...

Big table with zero

for an array, say: a = 1 0 0 1 0 1 1 1 1 0 0 1 you can just do: ...

5ヶ月 前 | 0

| 採用済み

回答済み

get value from uicontrol editbox

You either set a callback function for that edit box, that will be triggered whenever the user hits the enter key, edit = uicon...

get value from uicontrol editbox

You either set a callback function for that edit box, that will be triggered whenever the user hits the enter key, edit = uicon...

5ヶ月 前 | 0

| 採用済み

質問

Matlab figure textbox: inconsistent line spacing for string

I am having problems with the new-line spacing of the string in my textbox (that is in a panel, in a figure) The string is set ...

5ヶ月 前 | 0 件の回答 | 0

回答済み

Improving the fitting of data

the polyfit and polyval functions will help you here: https://www.mathworks.com/help/matlab/ref/polyfit.html also, just for th...

Improving the fitting of data

the polyfit and polyval functions will help you here: https://www.mathworks.com/help/matlab/ref/polyfit.html also, just for th...

5ヶ月 前 | 0

質問

Improve figure update speed with WindowsButtonMotionFcn

Hi all, I have a WindowsButtonMotionFcn defined to essentially move a lineobject on my axes to where my cursor is. Unfortunate...

5ヶ月 前 | 0 件の回答 | 0

回答済み

Indices on the left side are not compatible with the size of the right side error

M=[]; theta=linspace(0,180,401); x=linspace(0,10,501); for i_theta = 1:length(theta) for i_x = 1:length(x) M...

Indices on the left side are not compatible with the size of the right side error

M=[]; theta=linspace(0,180,401); x=linspace(0,10,501); for i_theta = 1:length(theta) for i_x = 1:length(x) M...

5ヶ月 前 | 1

回答済み

How to check the output

you've defined the function to be: function A = warmUpExercise() so the output is going to be whatever A is defined to be in t...

How to check the output

you've defined the function to be: function A = warmUpExercise() so the output is going to be whatever A is defined to be in t...

5ヶ月 前 | 0

| 採用済み

回答済み

Using a drop down menu or pushbuttons to display graphs

does this work for you? function PlotType(src,event) val = src.Value; str = src.String; if strcmp(src.Stri...

Using a drop down menu or pushbuttons to display graphs

does this work for you? function PlotType(src,event) val = src.Value; str = src.String; if strcmp(src.Stri...

5ヶ月 前 | 0

回答済み

How do I show the for loop results over time?

n = 100000; %number of trials score = zeros(n,2); % first column is player 1, 2nd column is player 2 for i = 1:n p1 = ran...

How do I show the for loop results over time?

n = 100000; %number of trials score = zeros(n,2); % first column is player 1, 2nd column is player 2 for i = 1:n p1 = ran...

5ヶ月 前 | 0

| 採用済み

質問

How to make functions outside of Class folder hidden from access

Hi all, I have a class folder, we'll call class1. class1 contains properties and methods, both hidden and not. To access thes...

5ヶ月 前 | 1 件の回答 | 0

回答済み

inconsistency when comparing cell arrays with strings vs char array

'abcd' is considered a 1v4 char. "abcd" is considered a 1x1 string

inconsistency when comparing cell arrays with strings vs char array

'abcd' is considered a 1v4 char. "abcd" is considered a 1x1 string

5ヶ月 前 | 0

回答済み

How do I use the OR "||" operator in an 'if' statement on multiple possible strings?

I would suggest using switch / case, it's a lot more intuitive to look at: for i = 1:length(Names) switch Names(i) ...

How do I use the OR "||" operator in an 'if' statement on multiple possible strings?

I would suggest using switch / case, it's a lot more intuitive to look at: for i = 1:length(Names) switch Names(i) ...

5ヶ月 前 | 1

| 採用済み