답변 있음
change color of bar plot
y = [12 22 23; 21 25 26; 24 18 19; 22 17 15]; h = bar(y,'stacked'); % capture the bar objects into variable 'h' legend({'Set #...

3년 초과 전 | 0

답변 있음
Appdesigner, knob value
uiknob 'Value' is a numeric (https://www.mathworks.com/help/matlab/ref/matlab.ui.control.knob-properties.html), so both strcmp c...

3년 초과 전 | 1

| 수락됨

답변 있음
how can i define legend for bar3
bar3(randi(6000,[4,5]).*(1:5)); colors = [0 0.2 0.7; 0.8 0 0.1; 0 0.5 0; 0.5 0 0.5; 0 0.4 0.7]/0.8; colormap(colors) xticklab...

3년 초과 전 | 0

답변 있음
find value with row and column
matrix = magic(4) value = 10 [row,column] = find(matrix == value)

3년 초과 전 | 0

답변 있음
Sort columns of a table by the value corresponding
% I make a table of random data with 10 columns and 1 row, to represent your table C = num2cell(rand(1,10)); T = table(C{:},'V...

3년 초과 전 | 1

답변 있음
Find repeated values of one column and assign the lowest value from the group of second columns
M = [12709.2240000000 -1.23920000000000 12709.2240000000 -1.23530000000000 12780.2225000000 -1.23530000000000 ...

3년 초과 전 | 0

| 수락됨

답변 있음
Finding the number of digits of the expected value of the codeword in extended Huffman Coding
Instead of this exp_value = exp_value + probVectorSuperSymbols(i) * length(extended_dict(2:i)); Do this exp_value = exp_value...

3년 초과 전 | 0

| 수락됨

답변 있음
Make the half note rest for two beats
Looks like this: rest2 = zeros(1,count*dr); should be this: rest2 = zeros(1,count*drest); Otherwise, rest2 is th...

3년 초과 전 | 0

| 수락됨

답변 있음
Toggle between temperature units for unit conversion
You need to take into account what the old unit was before it was changed. Fortunately, the ValueChangedFcn of a uidropdown prov...

3년 초과 전 | 0

| 수락됨

답변 있음
I need code for processing of table data
"we start from B2, if mod(B2 - B3) < 0.404 we delete A3B3 and continue to compare B2 with B(i), if B2 - B(i) >= 0.404 we leave t...

3년 초과 전 | 0

답변 있음
Plotting a function where the x-axis is also a function
t=0:1:50; v=6.6524*(exp(0.0183993*t)-1); % p=2295000*v(1+0.2647*v); % ^^ missing operator (.*) p=2295000*v.*(1+0...

3년 초과 전 | 0

| 수락됨

답변 있음
Errors with imshow function
The image function creates an image object. The imshow function creates an image object and does other stuff to the axes, given...

3년 초과 전 | 0

답변 있음
Find data after 'matched' regular expresion in a file
CatalogName = 'SAMPLE.txt'; Catalog = fileread(CatalogName) out = regexpi(Catalog,'NAME (\S+)','tokens'); out{:}

3년 초과 전 | 0

답변 있음
How can I make a function from this few lines of codes?
% calling the function defined below filter_and_plot(-40:2:40) % defining the function function filter_and_plot(A) B = A...

3년 초과 전 | 0

답변 있음
How can i vary the value of one parameter and plot them on same graph?
One way is to make the function ddems nested inside the function idtry and make k a variable in idtry's workspace; then k will b...

3년 초과 전 | 0

| 수락됨

답변 있음
Why there is error in using interp2 while assigning loaded data to the variable?
Try this: S = load("H2.mat"); data = S.data; h = interp2(data.P,data.T,data.H,235e+05,315);

3년 초과 전 | 0

| 수락됨

답변 있음
I can't find out the answer of conv x(n)=n/4(u(n)-u(n-6)) , h(n)=2[u(n+2)-u(n-3)] using stem function to make a plot.But i shows me conv error.How can I solve it ?
The code runs without error for me. Do you have a variable called conv? If so, that would prevent you from using the conv fun...

3년 초과 전 | 0

답변 있음
How to plot z = x^2 * y
You have an extra space between "." and "*" Z = X.^2. * Y; % ^ space breaks up the .* operator That causes Z to be the...

3년 초과 전 | 0

답변 있음
How to exclude/extract empty rows/columns in a table?
% read input file into table T T = readtable('test_file.txt'); % get a logical matrix saying whether each element of the tab...

3년 초과 전 | 0

답변 있음
Calculate and plot linear amplitude versus linear frequency.
One thing is that you're calling plot with the inputs reversed. The syntax is plot(x,y); in this case, frequency (the variable f...

3년 초과 전 | 0

| 수락됨

답변 있음
Operator '*' is not supported for operands of type 'cell'.
Inflow_file = 'oppgave.xlsx'; T = readtable(Inflow_file, 'range', 'A1:A10956') inflow_s = str2double(T{:,1})

3년 초과 전 | 0

답변 있음
Automatically identify two numbers within an matrix
matrix = readmatrix('matrix.txt'); matrix_1 = readmatrix('matrix_1.txt'); min_matrix = min(matrix(matrix >= 70)) max_matrix...

3년 초과 전 | 0

| 수락됨

답변 있음
how make a plot where both x and y are varying?
Like this? C = 1:10; % C changing B = 1; % B constant D = 1; A = B.*C.*D; subplot(2,1,1) plot(C,A) xlabel('C') yl...

3년 초과 전 | 0

| 수락됨

답변 있음
x and y ticks in pcolor plots
Set the axes property 'Layer' to 'top' in order to get the grid to show up on top of the pcolor surface. % a pcolor with EdgeCo...

3년 초과 전 | 2

| 수락됨

답변 있음
I have a code but it keep saying "invalid expression. when calling a function or indexing a variable, use parentheses. otherwise check for mismatched delimiters
It runs without error and shows a plot. Probably there's a syntax error in a nearby part of your code. prob = RollingDice() ...

3년 초과 전 | 0

답변 있음
Create box chart with only Min Max Mean and Standard Deviation values
I don't know of a way to explicitly specify the min, max, mean and std of a data set in boxchart (or boxplot). (Note that those ...

3년 초과 전 | 0

답변 있음
Is there a command that can check if a string is present in a certain array and output that same string?
I'm confused about what you want the output to be. L = {1, ["Spring", "Summer"]; 0, ["Winter", "Summer","Autumn"]}; ism = ce...

3년 초과 전 | 0

| 수락됨

답변 있음
Check/Uncheck box in app designer after opening and closing a secondary figure
See the attached modified app and m-file. See the comments in the code for descriptions of how it works. In addition to the beh...

3년 초과 전 | 0

| 수락됨

답변 있음
Multiplication of vectors in for loops
Possibly this: radius = rand(3,3); % contains 9 different values ycenter = 0; anglesRad = [0 1 2]; % I guess this is a 1-by-3...

3년 초과 전 | 0

| 수락됨

답변 있음
Plotting within for loop
for r = r(:,1) This redefines the variable r. Before the loop executes, r is a 3-by-7 matrix. After the loop, r will be a 3-by-...

3년 초과 전 | 0

더 보기