Answered

Too many output arguments.

I fail to reproduce the error you report >> [t,y] = valori( 2 ); >> [t,y] = valori( 1 ); >> [t,y] = valori( 3 ); no error, n...

Too many output arguments.

I fail to reproduce the error you report >> [t,y] = valori( 2 ); >> [t,y] = valori( 1 ); >> [t,y] = valori( 3 ); no error, n...

environ un mois ago | 1

| accepted

Answered

@-folder and functionSignatures.json

The R2019b doc Customize Code Suggestions and Completions says "For MATLAB to detect the function signature information, you mu...

@-folder and functionSignatures.json

The R2019b doc Customize Code Suggestions and Completions says "For MATLAB to detect the function signature information, you mu...

environ un mois ago | 1

| accepted

Answered

Index in position 2 exceeds array bounds (must not exceed 6). heat transfer PDE finite difference

The term T_old(i+1,j+2) causes the error when j==5, because T_old(2,7) doesn't exist. T_old has only 6 columns.

Index in position 2 exceeds array bounds (must not exceed 6). heat transfer PDE finite difference

The term T_old(i+1,j+2) causes the error when j==5, because T_old(2,7) doesn't exist. T_old has only 6 columns.

environ un mois ago | 0

Answered

what pc for student desktop use

See System Requirements for MATLAB R2019b "Matlab can be very slow" I beg to disagree, but YMMV. Did you run MATLAB benchmark...

what pc for student desktop use

See System Requirements for MATLAB R2019b "Matlab can be very slow" I beg to disagree, but YMMV. Did you run MATLAB benchmark...

environ un mois ago | 0

Answered

How to export complex-valued matrix to HDF file

Datatype: H5T_COMPOUND   is not supported by the Matlab high-level HDF5 functions. The low-level functions, which interact d...

How to export complex-valued matrix to HDF file

Datatype: H5T_COMPOUND   is not supported by the Matlab high-level HDF5 functions. The low-level functions, which interact d...

environ un mois ago | 1

Answered

How do I read a file with complex data (real + imaginary) into a vector?

What problem do you encounter? With R2018b dlmread() reads your small data set nicely. Padding is done with 0+0i >> C = dlmre...

How do I read a file with complex data (real + imaginary) into a vector?

What problem do you encounter? With R2018b dlmread() reads your small data set nicely. Padding is done with 0+0i >> C = dlmre...

environ un mois ago | 0

Answered

divide a matrix per a vector

Try C = A ./ reshape( U2, [],1 );

divide a matrix per a vector

Try C = A ./ reshape( U2, [],1 );

environ un mois ago | 0

| accepted

Answered

Forming loop to simplify codes

"produce the same graph" The code below produces the same graph. However it may be disputed whether it's simpler less inter...

Forming loop to simplify codes

"produce the same graph" The code below produces the same graph. However it may be disputed whether it's simpler less inter...

environ un mois ago | 0

| accepted

Answered

Using the Mod Function to Turn a Vector (i.e. 1:15) into [1, 2, 3, 1, 2, 3, 1, 2, 3] etc.

Or %% startVector = 1:15; vec = mod( startVector, 3 ); vec(vec==0)=3 % replace all zeros by 3 vec = Columns 1 through...

Using the Mod Function to Turn a Vector (i.e. 1:15) into [1, 2, 3, 1, 2, 3, 1, 2, 3] etc.

Or %% startVector = 1:15; vec = mod( startVector, 3 ); vec(vec==0)=3 % replace all zeros by 3 vec = Columns 1 through...

environ un mois ago | 0

Answered

Why can't I use crand() in matlab

crand is in Robust Control Toolbox >> which crand -all % -all toolboxes that are installed on my PC C:\Program Files\MATL...

Why can't I use crand() in matlab

crand is in Robust Control Toolbox >> which crand -all % -all toolboxes that are installed on my PC C:\Program Files\MATL...

environ un mois ago | 1

Answered

Simple question about creating row vector

Replace ^ by .^ >> 2.^(0:5) ans = 1 2 4 8 16 32 See power, .^ Element-wise power

Simple question about creating row vector

Replace ^ by .^ >> 2.^(0:5) ans = 1 2 4 8 16 32 See power, .^ Element-wise power

environ un mois ago | 1

| accepted

Answered

Is there inheritable behavior (or a Mixin) for setting/getting the 'Parent' and 'Children' properties of a custom class?

"make the following code error-free" There is a problem regarding handle or value class. In the code it's assumed that superCla...

Is there inheritable behavior (or a Mixin) for setting/getting the 'Parent' and 'Children' properties of a custom class?

"make the following code error-free" There is a problem regarding handle or value class. In the code it's assumed that superCla...

environ un mois ago | 0

| accepted

Answered

how to plot 1x22000 struct with 1 field??

The screenshot of the Command Window shows that the data-20.mat contains Qt, which is a <1x22000 struct>. I assume that Qt has...

how to plot 1x22000 struct with 1 field??

The screenshot of the Command Window shows that the data-20.mat contains Qt, which is a <1x22000 struct>. I assume that Qt has...

environ 2 mois ago | 0

Answered

How do I extract data from a specific subplot in a MATLAB figure?

This illustrates the old way to do it. (There might be shortcut nowadays.) %% Example from the documentation of subplot subpl...

How do I extract data from a specific subplot in a MATLAB figure?

This illustrates the old way to do it. (There might be shortcut nowadays.) %% Example from the documentation of subplot subpl...

environ 2 mois ago | 0

Answered

Having trouble using the built in table function

%% variable_names = ["variable","month","min","mean","median","mode","max","std"]; variable = [ repmat("Mean T",1,12),repmat("...

Having trouble using the built in table function

%% variable_names = ["variable","month","min","mean","median","mode","max","std"]; variable = [ repmat("Mean T",1,12),repmat("...

environ 2 mois ago | 0

| accepted

Answered

How can I call variable with a name from the value in cell array??

A variant without eval() %% sv.AFEN = (1:10)'; sv.AFMN = (2:22)'; sv.AFDN = (11:15)'; SeedValue = 'AFEN'; %% rn = randi( ...

How can I call variable with a name from the value in cell array??

A variant without eval() %% sv.AFEN = (1:10)'; sv.AFMN = (2:22)'; sv.AFDN = (11:15)'; SeedValue = 'AFEN'; %% rn = randi( ...

environ 2 mois ago | 2

Answered

hdf5 dataset dynamically creating

Yes, see example, "Append Data to Unlimited Data Set", in h5write Write to HDF5 data set

hdf5 dataset dynamically creating

Yes, see example, "Append Data to Unlimited Data Set", in h5write Write to HDF5 data set

environ 2 mois ago | 0

| accepted

Answered

Not Converting ASCII to DECIMAL

I guess the problem is in the meaning of "Converting ASCII to DECIMAL". The character '1' is represented by the decimal ascci...

Not Converting ASCII to DECIMAL

I guess the problem is in the meaning of "Converting ASCII to DECIMAL". The character '1' is represented by the decimal ascci...

environ 2 mois ago | 0

Answered

How to find strings in a very large array of data?

"random strings like 'zgdf'" If that means letters of the US alphabet, this code is rather fast. %% chr = fileread('cssm.txt'...

How to find strings in a very large array of data?

"random strings like 'zgdf'" If that means letters of the US alphabet, this code is rather fast. %% chr = fileread('cssm.txt'...

environ 2 mois ago | 0

Answered

How do I invoke my property set method?

Doc says: You cannot call property access methods directly. MATLAB calls these methods when you access property values. "objX....

How do I invoke my property set method?

Doc says: You cannot call property access methods directly. MATLAB calls these methods when you access property values. "objX....

2 mois ago | 0

Answered

Invalid file identifier. Use fopen to generate a valid file identifier.

Try filespec = fullfile( "/Users/kira/desktop/PHYS4115Tables/'att'", filename ); fileID = fopen(filespec, 'rt'); assert(file...

Invalid file identifier. Use fopen to generate a valid file identifier.

Try filespec = fullfile( "/Users/kira/desktop/PHYS4115Tables/'att'", filename ); fileID = fopen(filespec, 'rt'); assert(file...

2 mois ago | 0

Answered

CSV file imported with readmatrix is misreading the data in the CSV file

"The resulting array consists of 5 digit numbers with a decimal point after the first number." I assume that you describe how ...

CSV file imported with readmatrix is misreading the data in the CSV file

"The resulting array consists of 5 digit numbers with a decimal point after the first number." I assume that you describe how ...

2 mois ago | 0

Answered

Compare two arrays (intersection) and create new array with output columns, but with repetitions

Your way of defining A, B and C makes me wonder whether you intended to define matrices, not vectors. Anyhow, this is a differe...

Compare two arrays (intersection) and create new array with output columns, but with repetitions

Your way of defining A, B and C makes me wonder whether you intended to define matrices, not vectors. Anyhow, this is a differe...

2 mois ago | 0

| accepted

Answered

Working With Matlab Tables

"I remember from somewhere" With Matlab that doesn't work for me. I need to consult the documentation more often than not. This...

Working With Matlab Tables

"I remember from somewhere" With Matlab that doesn't work for me. I need to consult the documentation more often than not. This...

2 mois ago | 0

Answered

Calling .inp file into MATLAB

" .inp file created in Abaqus" is that a text file like the sample below? If so, Matlab itself together with its toolboxes don'...

Calling .inp file into MATLAB

" .inp file created in Abaqus" is that a text file like the sample below? If so, Matlab itself together with its toolboxes don'...

2 mois ago | 0

Answered

Launching a thread that effectively pushes a button in your GUI periodically

Create a timer ( see timer class Create object to schedule execution of MATLAB commands) that periodically invokes the Update c...

Launching a thread that effectively pushes a button in your GUI periodically

Create a timer ( see timer class Create object to schedule execution of MATLAB commands) that periodically invokes the Update c...

2 mois ago | 1

| accepted

Answered

Creating random vector with 10 different lengths

Documentation on randi says: X = randi(imax,n) returns an n-by-n matrix of pseudorandom integers drawn from the discrete unifor...

Creating random vector with 10 different lengths

Documentation on randi says: X = randi(imax,n) returns an n-by-n matrix of pseudorandom integers drawn from the discrete unifor...

2 mois ago | 1

Answered

[ERROR] Index exceeds array dimensions. Index value 0 exceeds valid range [1-1] of array Coeff.p01.

I guess that this term causes the error Coeff.p01(torque*Coeff.b/Coeff.T_max) and that's because torque*Coeff.b/Coeff.T_max ev...

[ERROR] Index exceeds array dimensions. Index value 0 exceeds valid range [1-1] of array Coeff.p01.

I guess that this term causes the error Coeff.p01(torque*Coeff.b/Coeff.T_max) and that's because torque*Coeff.b/Coeff.T_max ev...

2 mois ago | 0

Answered

How do I use regexp to extract text between numbers

"So the end product I want will be a 16x1 string that looks like" I'm not sure exactly how understand your requirement. The pr...

How do I use regexp to extract text between numbers

"So the end product I want will be a 16x1 string that looks like" I'm not sure exactly how understand your requirement. The pr...

2 mois ago | 1

Answered

find a string using regular expression using a special condition

Assumptions regarding the search terms case is significant. ( "liquid, X" the lower case "l" is a typo.) space is significant...

find a string using regular expression using a special condition

Assumptions regarding the search terms case is significant. ( "liquid, X" the lower case "l" is a typo.) space is significant...

2 mois ago | 0

| accepted