質問


Why Do I Get This Error for This Non-scalar Structure?
I have this struct: A(1).B.C = 'a'; A(2).B.C = 'b'; A(3).B.C = 'a'; When I execute the code below, it works A...

約7年 前 | 4 件の回答 | 0

4

回答

質問


How to Change Values of a Field by an Indexing Array?
Here’s my initial struct: A(1).B.C = 'a'; A(2).B.C = 'b'; A(3).B.C = 'a'; A(4).B.C = 'a'; I want to change the...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Access to Fields of a Non-scalar Struct?
How can I create the 4-by-1 cell array D from the struct A? A(1).B.C = 'a'; A(2).B.C = 'b'; A(3).B.C = 'c'; A(4).B...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How Does This Short Code Work?
How is D calculated? Could you explain the steps that MATLAB takes to calculate D? Is it only for logical values or can be ex...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Put an Arrays Elements in a Structure?
Is there any way to get as same a result as the code below without having that annoying for loop? A = [1; 1; 0; 0; 0; 0; 1]...

約7年 前 | 1 件の回答 | 0

1

回答

質問


A Message Box for a Nested Loop to Report Progress?
I have a nested loop that takes minutes to finish. I want to put a piece of code in the position of Statement2 to know about the...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Get the File Name and Store a File into a Struct While Using the Function uiopen?
I want to do two extra things while calling uiopen function. 1) How can I get the file that is opened? For example, I open A...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Keep Objects Organized while Maximizing a Figure?
Objects look fine on a figure until I maximize the figure. How can manage the position of objects when I maximize or generally c...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Manage the Order of Graphics Objects and Plots on an Axes Object?
How to manage to specify the order of p1,r1, and r2? For example, how can I put p1 between r1 and r2? f = figure; ...

約7年 前 | 1 件の回答 | 0

1

回答

質問


Easiest Way to Assign Graphics Objects to a 1-by-n Struct?
How to assign graphics objects to a 1-by-5 struct field? Is there an easier way than using a for loop and assign the values elem...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Put These Vectors in a Matrix?
A.B.G = [1 2 3]; A.C.G = [4 5 6]; A.D.G = [7 8 9]; A.E.G = [10 11 12]; A.F.G = [13 14 15]; so it will look li...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Use a For Loop to Dynamically Assign the Values of Struct Fields to a Matrix?
How to use a for loop to dynamically assign the values of fields C, D, and G to a matrix? if for loop is not possible, what e...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Exclude Some Fields While Using the Function structfun?
A.B.C = [1 2 3]; A.B.D = [3 4 5]; A.B.E = [6 7 8]; How to exclude A.B.E from the calculation and just get the sums o...

約7年 前 | 2 件の回答 | 0

2

回答

質問


What Is the Definition of Scalar Structure?
What Is the Definition of Scalar Structure?

約7年 前 | 1 件の回答 | 1

1

回答

質問


How to Assign Values from a Struct to a Matrix in a For Loop?
A.B.C = [1 2 3]; A.B.D = [3 4 5]; for k = 1:2 G(k, :) = A.B.C; G(k, :) = A.B.D; end G G returns: ...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Assign a Struct Field to a Matrix?
How can it assign field C and field D to the first and second rows of G, respectively? A.B.C = [1 2 3]; A.B.D = [3 4 5];...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Read this Code in English?
I am not an English-speaking person. How is the correct way to describe the code below with words? A.B.C = 1

約7年 前 | 1 件の回答 | 0

1

回答

質問


How MATLAB Reads an M File?
I have the two following functions in a MATLAB M File. Am I right that when you run an M File in Matlab, MATLAB ALWAYS executes ...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Expand an Existing Structure Array?
As a simple example, I create the struct B with one field: B.D = 1; How do I set parent struct A for the above-ment...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Assign These Values to This Struct?
As an example, I want to dynamically assign four output arguments of ttest function to four field of struct A, but I get the err...

約7年 前 | 1 件の回答 | 0

1

回答

質問


Why Isn’t One of Plots Shown?
I have some questions regarding the code below hax1 = axes('OuterPosition', [0 0 0.5 0.5]); hax2 = axes('OuterPositi...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Define a Default Input Argument for a Function?
How to define a default input argument for a function? I want to set a default input argument which will be replaced later by ne...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Directly Plot Spherical Coordinates?
Is there any way to plot spherical coordinates (theta, phi, rho) without first converting them into Cartesian coordinates?

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Create a Column Vector of a Field of a Struct?
How to create column vectors out of B (i.e., D = [10;20;30]) and C (i.e., E = [100;200;300])? A(1).B = 10; A(2).B = 20; ...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Access a Variable's Value in a Nested Function?
How Can I see the value of variable g in Command window and Workspace? function parentfcn(b) a = b+1 function chi...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Execute Something When a Graphics Object is Left-Clicked?
I want the red rectangle to turn green when I only “left-click” (not right-click or middle click) on it. What is the easiest sol...

約7年 前 | 1 件の回答 | 0

1

回答

質問


Hovering on an Graphics Object
I want the red rectangle to turn green while I'm hovering the mouse over it. How? hax = axes('XLim', [0 4], 'YLim', [0 4]);...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to Call Context Menu from Inside a Rectangle?
To call the context menu, I have to right-click exactly on the outline of the circle. Is there any way to call the rectangle whe...

約7年 前 | 1 件の回答 | 0

1

回答

質問


How to access a field of a struct by indexing?
I have a 1-by-1 struct that possesses 3 fields named B, C, and D. Is there any way to call D by its index (i.e., D is the third ...

約7年 前 | 2 件の回答 | 2

2

回答

質問


How to Suppress a Function?
When I run the code below, MATLAB runs it and I get the error “Not enough input arguments”. Isn’t there any way to tell MATLAB t...

約7年 前 | 1 件の回答 | 0

1

回答

さらに読み込む