回答済み
How to change scaling for different ranges of X-Axis inn figures?
Use set(gca(),'XScale','log') or semilogx.

3日 前 | 1

| 採用済み

回答済み
How to plot a function F(a,b) having a matrix F (axb)
surf(phi,sigmap,syy)

4日 前 | 0

回答済み
How can I change all numbers in matrix to 1? except for 0
One way: M = randi(4,[5 5])-2 % a matrix with zero and non-zero elements M(M ~= 0) = 1 % replace non-zero elements with ones ...

4日 前 | 0

| 採用済み

回答済み
Working with a cell of strings
Use string or cellstr. C = {"one";"two"} string(C) cellstr(C)

4日 前 | 0

| 採用済み

回答済み
Element-wise set operations
C = A == B.';

4日 前 | 0

| 採用済み

回答済み
Finite Element: Filling nxm matrix by extracting values from another nx1 matrix
V(2:5,2:5) = reshape(W,4,[]).';

4日 前 | 0

回答済み
Finding slope for the polyfit line
polyfit returns the coefficients in a vector, with the highest-degree coefficient first. Therefore, the slopes are the values of...

5日 前 | 0

| 採用済み

回答済み
plotting 12 graphs in one figure
load data_matrix.mat data=SECTION_L; data(:,1:3)=[]; row=9; cleanup=data([1 2 3 row],:); % year range y1 = 1975; y2 = 201...

5日 前 | 0

| 採用済み

回答済み
how to create a new variable based off an if else statement on one variable?
t = table(["cats";"dogs";"cats";"sheep"],'VariableNames',"animals") all_animals = ["dogs" "cats" "sheep"]; [~,idx] = ismembe...

5日 前 | 0

| 採用済み

回答済み
Can I use colormap to set color of my cumulative area chart in area()?
area dioesn''t use the figure's colormap directly, but it does use the axes' ''ColorOrder' by default, so maybe something like t...

6日 前 | 0

回答済み
extract values from a table
It looks like, basically row 1 is year, row 2 is month, row 3 is day of month, and row 4 through the end are temperature data fo...

6日 前 | 0

回答済み
indeHow to index values from a cell array
data =readtable('EURUSD=X.csv'); disp(data) G = floor((0:height(data)-1)/20).' + 1; DataE20 = splitapply(@(Date,Open,High,Low...

6日 前 | 0

| 採用済み

回答済み
how to use "randi" in specific case?
Maybe something like this (the example A requires at least 5 values, e.g., [10 15 20 25 30]): A = [ ... 0 0 1 0 0 0 0 0 0 ...

6日 前 | 0

| 採用済み

回答済み
How to make certain indexes of a cell array empty?
pixelBlock{by + 1, bx + 1} = [];

6日 前 | 0

| 採用済み

回答済み
How to initialize a table column to a character array?
% a table: filetext = table([1;2;3;4;5;6]) % append a column of all 'MET' on the right: filetext{:,end+1} = 'MET'

6日 前 | 0

| 採用済み

回答済み
Custom heat maps- How to highlight a specific value in the heatmap
Maybe one of the following two approaches will be useful, depending on exactly what you want to see. First, make up some data: ...

6日 前 | 1

| 採用済み

回答済み
How to plot amplitude values of a matrix (dimension 651 by 10) with colorcode
How about this? load('amp.mat') load('cluster.mat') colors = 'gkcrw'; for ii = 1:5 idx = find(cluster == ii); pl...

6日 前 | 0

回答済み
'This statement is incomplete' for a function with enough parameters
This error can happen when there is a syntax error within the function itself (not just the line defining the function signature...

6日 前 | 0

| 採用済み

回答済み
Combining rows of each field within a structure
S = load('Combined_Structure.mat','ModOutRstance_interp_x_all'); new_struct = struct(); f = fieldnames(S.ModOutRstance_inter...

6日 前 | 0

| 採用済み

回答済み
why when i import an image from my desktop the error says it doesnt exist plz help and thank u in advance
Use both output arguments from uigetfile to construct the full path name of the file: [filename,pathname] = uigetfile(); ful...

7日 前 | 0

| 採用済み

回答済み
please can someone tell me what to do here what does it mean ? and does setappdata fall under a certain library i need to install for matlab plz help
setappdate(0,'filename',filename); % ^ this should be an "a". setappdata not setappdate

7日 前 | 0

回答済み
Getting different values when indexing with islocalmax and find
The reason the elements of max_A_2 and max_A are not all equal has to do with how the results of indexing with a logical matrix ...

7日 前 | 0

回答済み
How to plot quiver with same scale on x and y axis?
Have you tried axis equal? % random quiver plot d = datenum(now()); x = d:1e-6:d+1e-4; y = randn(1,101); u = randn(1,101)...

7日 前 | 0

回答済み
I need help setting a pushbutton in a GUI
% (you can specify all those properties at the same time as you create the % uicontrol) my_third_button = uicontrol( ... ...

7日 前 | 0

| 採用済み

回答済み
What indices of the original sequence are retained in the output of the decimate function?
From item #3 in the Algorithms section of the documentation for decimate: "In the resampled sequence (y), y(end) matches x(end)...

7日 前 | 0

| 採用済み

回答済み
How to show function's result from command window to a "text area or edit field" in app designer ??
function get_powerButtonPushed(app, event) app.PowerTextArea.Value = app.obj.get_power(1); end Note that this is the call...

7日 前 | 0

| 採用済み

回答済み
Read text file, identify variables and rewrite some of the variables
% read the file into a char vector: fid = fopen('Initial.txt'); data = fread(fid,'*char').'; fclose(fid); disp(data); % spl...

7日 前 | 1

| 採用済み

回答済み
Search for the Y coordinate knowing the X coordinate
coord_x = A(:,1); coord_y = A(:,2); [X,idx] = max(coord_x); Y = coord_y(idx);

7日 前 | 1

| 採用済み

回答済み
Padding a cell array?
Maybe something like this: C = {1 2 3 4}; C_new = cell(1,2*numel(C)); C_new(1:2:end) = C

8日 前 | 0

| 採用済み

回答済み
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-2.
This line, which is a few lines above the line with the error: vr(ii,jj) = lamb/(2.*pi*r); makes vr a 1-by-2 vector when it is...

8日 前 | 0

さらに読み込む