Community Profile # Stephen23

2014 年からアクティブ

Suspensa Vix Via Fit

#### 統計

All
• • • • • • • • • • • • バッジを表示

#### Content Feed

how to know first element in Data struct
arrayfun(@(s)s.data(1),Sis)

| 採用済み

Convert matrix from 3d to 4d?
Where M is your array: N = permute(M,[1,2,4,3])

Readtable importing variables from wrong sheet
ImpOpts = detectImportOptions(FullPath, "Sheet",2); ImpOpts.PreserveVariableNames = true; MeasData = readtable(FullPath, ImpO...

| 採用済み

Fields of Struct are not changing with functions
" even i am calling the app struct inside the functions and I am changing the fields of frame and max range, the actual app.fram...

How can I compress a table
"How can I compress them so that al of the data of one year is stored in one row. (as in the picture below?" Your screenshot sh...

1日 前 | 1

| 採用済み

How can I merge two arrays in adjacent cells?.
X = [1,2,3]; Y = [4,5,6]; C = arrayfun(@horzcat,X,Y, 'uni',0)

1日 前 | 0

How to reshape data in 4-D array correctly?
You can use PERMUTE like this: v = 1:16; z = permute(reshape(v,[2,2,2,2]),[4,3,2,1]); z(1,1,1,1) z(1,1,1,2) z(1,1,2,1)

2日 前 | 0

Why does Readtable return NaN for values greater than 1000?
Ugh, double-quoting number values really is an abuse of CSV norms. Note that is not possible to simply remove/ignore the double ...

2日 前 | 1

| 採用済み

i have a erorr with echo when i use soundsc command
MATLAB has a function named ECHO, which has no output arguments: https://www.mathworks.com/help/matlab/ref/echo.html This is w...

4日 前 | 0

Error with matrix size
The size of the matrix A is not important. The size of the RHS of the "=" is important. Lets check that size: A = rand(9,9); B...

4日 前 | 0

| 採用済み

how to suggest a name to save
You could download my function NEXTNAME and use it to provide the name: https://www.mathworks.com/matlabcentral/fileexchange/64...

4日 前 | 0

Converting unix time stamp to datatime
You got the ticks wrong: those values given in the DT field are simply counts of the seconds since the epoch (which is the defin...

6日 前 | 0

| 採用済み

how can I get a list of the countries used by the mapping toolbox as a cell array?
The regions used by WORLDMAP are (note that this is in a private directory, is subject to change, use at own risk): F = fullfil...

7日 前 | 0

How to concatenate the elements of the structure?
Where S is your structure and F is the relevant field: cat(3,S.F) https://www.mathworks.com/matlabcentral/answers/1656435-tuto...

7日 前 | 0

| 採用済み

concatenating the rows to have a column wise data
The MATLAB approach: T = readtable('data.csv', 'VariableNamingRule','Preserve') P = digitsPattern+":"+digitsPattern; U = stac...

7日 前 | 0

Matlab function assumed inputs
The simplest approach is to use the ARGUMENTS block: https://www.mathworks.com/help/matlab/ref/arguments.html https://www.math...

12日 前 | 1

Order of code execution seems weird
Try calling DRAWNOW after setting the editfield values.

13日 前 | 1

| 採用済み

how to zero pad a vector to have the same amount of data as a vector with more data?
Simpler: in(end+1:numel(verb)) = 0;

16日 前 | 2

sorting list of structures in a structure
It is unclear what the problem is, because you did not explain or show either the "wrong" order nor the "right" order. If you wa...

16日 前 | 0

| 採用済み

Help with Pre-allocating function values
The MATLAB approach: lf = [697,770,852,941]; hf = [1209,1336,1477]; [X,Y] = meshgrid(lf,hf); f = [X(:),Y(:)] Or T = comb...

17日 前 | 1

| 採用済み

I have a problem in my code. Who can help me to fix it?.. I can't find my mistake. Please help me.
Rather than forcing pseudo-indices into variable names and then attempting to use STR2FUNC.... simply use a cell array: lambda ...

19日 前 | 1

| 採用済み

How to avoid log10 from calculating for log values or if its calculated for complex log how do i avoid it?
"how do i avoid this function calculating the log value of negative numbers." Don't call the function with negative values. de...

19日 前 | 0

| 採用済み

xxx = {'Lavorato assieme n. giorni',' ',1;'Giorno Positivi e negativi ',' ',2} xxx(3,:) = {'Lavorato xxx',' ',3}

19日 前 | 0

| 採用済み

Illegal use of reserved keyword "elseif" keep showing up?
If you align your code consistently then the problem is very clear: if inp == '0' .. end % <- delete this elseif inp =='...

20日 前 | 1

| 採用済み

Using repelem to vertially concatonate non-numeric variable
".. repmat function might be a better choice, since it allows the dimensions to be specified." As does REPELEM: repelem('1001_...

20日 前 | 1

Is there a functional form in Matlab to get the same result as A{:}?
The closest you can get is to convert the output into a structure and index into that (since R2019b) to generate a comma-separat...

20日 前 | 0

Error using bar: inputs must be 2-D
The command zeros(1,2,3,4,5,6,7) creates a 7D array with size 1x2x3x4x5x6x7. What you need is a 2D matrix: zeros(1,7) Tip: th...

21日 前 | 0

| 採用済み

Matlab - inputs must be scalar when using linspace
replace this line for i = find(~compareHeight) with for i = reshape(find(~compareHeight),1,[]) The cause is an awful, useles...

21日 前 | 0

rlocfind returns error: Execution of script poly as a function is not supported
"Execution of script poly as a function is not supported" You have created a script named POLY. Rename that script. To find th...

21日 前 | 1

| 採用済み

Inverse Matrix for 6x6 matrix with variables
syms x y z A = [x,y,y,0,0,0; y,x,y,0,0,0; y,y,x,0,0,0; 0,0,0,z,0,0; 0,0,0,0,z,0; 0,0,0,0,0,z]; b = inv(A)

22日 前 | 0