Question


Class definition: is it necessary to define properties as struct?
Hi all, I'm new to OOP in MATLAB. When defining properties in a class, shall I define them as constants or as a struct? For e...

7 years ago | 1 answer | 0

1

answer

Question


Method with struct input: how to accept different object subfields?
Hi all, In a method, how to accept different object subfields? https://uk.mathworks.com/help/matlab/matlab_oop/ordinary-me...

7 years ago | 1 answer | 0

1

answer

Question


Proper way of define a function with struct: readability vs reusability
Hi all, Imagine there is a function with many inputs and outputs, according to my knowledge there are two ways to design this...

7 years ago | 2 answers | 0

2

answers

Question


Struct as function input: different inputs?
Hello, I'm trying to write a method in a class, while this method follows this form: [obj] = testStructInpt(obj); and...

7 years ago | 1 answer | 0

1

answer

Question


Constant property definition, does this example include a constructor?
Hi all, I'm very very new to OOP in MATLAB. When reading the documentation of constant property I have this question. The exa...

7 years ago | 1 answer | 0

1

answer

Question


cellfun with Frobenius norm
Hi all, I'd like to obtain Frobenius norm for each element in a cell, I wrote this: a1 = (1:6)'; a2 = (2:7)'; ...

7 years ago | 1 answer | 0

1

answer

Question


Cellfun couple inpolygon?
Hi all, I have a cell denoting 4 grid blocks like this: parameter{:} ans = 1.5000 1.5000 1.7500 1...

7 years ago | 1 answer | 0

1

answer

Question


How to use structure properly?
Hi all, I have a newbie question, how to use structural variable properly? A minimum example: clear; clc; no.inpt = 5...

7 years ago | 2 answers | 0

2

answers

Question


Conflict in surf command between zscale and zlim?
Hi all, I'd like to plot several 3D surfaces with semilog scale on z-axis, but also set the z-axis limit to be the same, so I...

7 years ago | 1 answer | 0

1

answer

Question


How to define data input in an elegant way?
Hi all, I have a newbie question: in complex programs, we may have lots of input data like this (for instance in my program):...

7 years ago | 1 answer | 0

1

answer

Question


How to extract cell element from a multi-dimensional cell?
Hi all, I have a multi-dimensional cell like this: size(respPreStore) ans = 1 2 5 2 where each...

7 years ago | 1 answer | 0

1

answer

Question


How to change sign in a cell?
Hi all: I have a cell 'respPreStore' like this: size(respPreStore) ans = 1 2 5 2 each cell ele...

7 years ago | 1 answer | 0

1

answer

Question


How to use svd in cellfun?
Hello, I'd like to use svd in cellfun. Imagine a multidimensional cell like this: inst = cell(1, 3, 5, 2); inst(:,...

7 years ago | 1 answer | 0

1

answer

Question


What is the command in MATLAB to save an Excel file?
Hello, I'd like to automate a loop: 1. ABAQUS generates a Excel file; 2. Matlab utilises data in Excel file; 3. loop...

9 years ago | 1 answer | 0

1

answer