Answered

How to select a specific column in matrices?

A = ones(4) B = ones(4)*2 C = ones(4)*3 D = ones(4)*4 X = [A(:,2), B(:,2), C(:,2), D(:,2)]

How to select a specific column in matrices?

A = ones(4) B = ones(4)*2 C = ones(4)*3 D = ones(4)*4 X = [A(:,2), B(:,2), C(:,2), D(:,2)]

ongeveer 3 jaar ago | 1

Answered

Reading from Google sheeets using Matlab

Have you tried looking at the existing answers/solutions to this problem? https://www.mathworks.com/matlabcentral/answers/49624...

Reading from Google sheeets using Matlab

Have you tried looking at the existing answers/solutions to this problem? https://www.mathworks.com/matlabcentral/answers/49624...

ongeveer 3 jaar ago | 1

| accepted

Answered

Rearrange a CSV file

Assuming your data has headers to identify the column names as A...X: t1 = readtable('abc.csv'); t2 = readtable('test1.csv'); ...

Rearrange a CSV file

Assuming your data has headers to identify the column names as A...X: t1 = readtable('abc.csv'); t2 = readtable('test1.csv'); ...

ongeveer 3 jaar ago | 1

Answered

Reading .xlsx data with header text

The readtable function works for both spreadsheet (.xlsx) and text files (.txt). It will also consider the first row as the hea...

Reading .xlsx data with header text

The readtable function works for both spreadsheet (.xlsx) and text files (.txt). It will also consider the first row as the hea...

ongeveer 3 jaar ago | 0

Answered

¿Como solucionar ? Not enough input arguments.

You need to run the script so that X is provided: >> erlate(X) Not: >> erlate

¿Como solucionar ? Not enough input arguments.

You need to run the script so that X is provided: >> erlate(X) Not: >> erlate

ongeveer 3 jaar ago | 0

Answered

How to get file names only when using dir()?

fileList = {fileList.name} If you want to remove the file extension: fileList = strrep(filelist, '.mat', '')

How to get file names only when using dir()?

fileList = {fileList.name} If you want to remove the file extension: fileList = strrep(filelist, '.mat', '')

ongeveer 3 jaar ago | 2

Answered

import file with exponential numbers

format longE M = readmatrix('1.txt') See: https://www.mathworks.com/help/matlab/ref/format.html

import file with exponential numbers

format longE M = readmatrix('1.txt') See: https://www.mathworks.com/help/matlab/ref/format.html

ongeveer 3 jaar ago | 1

Answered

How to read data out of a .txt-File?

format longE T = readtable('textfile.txt', 'NumHeaderLines', 18); T = 3×2 table Var1 Var2 ...

How to read data out of a .txt-File?

format longE T = readtable('textfile.txt', 'NumHeaderLines', 18); T = 3×2 table Var1 Var2 ...

ongeveer 3 jaar ago | 0

Question

How can I get the error message from sldvrun when programmatically using Simulink Design Verifier?

I am using sldvrun in a script to run design error checking analyses on several models. When models encounter issues during the ...

ongeveer 3 jaar ago | 1 answer | 0

Answered

How to give input as a text and read the number corresponding to that text from the excel sheet

data = readtable('Spreadsheet.xlsx'); entry = data(strcmp(data.MaterialName, 'zinc'), :); entry.MaterialTemperature

How to give input as a text and read the number corresponding to that text from the excel sheet

data = readtable('Spreadsheet.xlsx'); entry = data(strcmp(data.MaterialName, 'zinc'), :); entry.MaterialTemperature

ongeveer 3 jaar ago | 1

| accepted

Answered

Triggering referenced models in Simulink

See "Triggered Sample Time" in: https://www.mathworks.com/help/simulink/ug/types-of-sample-time.html See "Conditions for Inheri...

Triggering referenced models in Simulink

See "Triggered Sample Time" in: https://www.mathworks.com/help/simulink/ug/types-of-sample-time.html See "Conditions for Inheri...

ongeveer 3 jaar ago | 1

| accepted

Answered

I want to convert this python code to matlab code . How can i do it?

Perhaps some previous answers can help you: https://www.mathworks.com/matlabcentral/answers/416129-how-to-convert-python-code-i...

I want to convert this python code to matlab code . How can i do it?

Perhaps some previous answers can help you: https://www.mathworks.com/matlabcentral/answers/416129-how-to-convert-python-code-i...

ongeveer 3 jaar ago | 0

Answered

block_diagram does not have a parameter named 'SaveOperatingPoint'

In 2018a models do not yet have the SaveOperatingPoint parameter.

block_diagram does not have a parameter named 'SaveOperatingPoint'

In 2018a models do not yet have the SaveOperatingPoint parameter.

ongeveer 3 jaar ago | 0

Answered

How to apply the func change color of Input port using Set param according to naming Convention?

for i = 1:length(A) name = get_param(A{i}, 'Name'); if regexp(name, '^Var_In_\d+$') set_param(A{i}, 'Backgrou...

How to apply the func change color of Input port using Set param according to naming Convention?

for i = 1:length(A) name = get_param(A{i}, 'Name'); if regexp(name, '^Var_In_\d+$') set_param(A{i}, 'Backgrou...

ongeveer 3 jaar ago | 0

Answered

how to set this parameters and coverage settings for simulink model through script?

models = {'model1', 'model2', 'model3'}; for i = 1:length(models) m = load_system(models{i}); set_param(m, 'Sto...

how to set this parameters and coverage settings for simulink model through script?

models = {'model1', 'model2', 'model3'}; for i = 1:length(models) m = load_system(models{i}); set_param(m, 'Sto...

ongeveer 3 jaar ago | 0

| accepted

Answered

using a variable to change destination path in movefile

Your first problem is that the first input into movefile should be a char array: movefile('C:/users/alast/Documents/LAB 5/image...

using a variable to change destination path in movefile

Your first problem is that the first input into movefile should be a char array: movefile('C:/users/alast/Documents/LAB 5/image...

ongeveer 3 jaar ago | 0

Answered

Transition blockset in simulink

To swtch between the block you can use an If-Action subsystem, like the example here: https://www.mathworks.com/help/simulink/sl...

Transition blockset in simulink

To swtch between the block you can use an If-Action subsystem, like the example here: https://www.mathworks.com/help/simulink/sl...

ongeveer 3 jaar ago | 0

Answered

How to read an xls file in matlab which has latitude (suffixed with N), longitude (suffixed with E), time (prefixed with the month), and a value corresponding to latitude and longitude in it?

You can use regexprep to clean up the values: opts = detectImportOptions('Test.xlsx', 'NumHeaderLines', 2, 'VariableNamesRange'...

How to read an xls file in matlab which has latitude (suffixed with N), longitude (suffixed with E), time (prefixed with the month), and a value corresponding to latitude and longitude in it?

You can use regexprep to clean up the values: opts = detectImportOptions('Test.xlsx', 'NumHeaderLines', 2, 'VariableNamesRange'...

ongeveer 3 jaar ago | 0

| accepted

Answered

How can I give main title for multi-graphs?

figure; plot(rand(5,1)); annotation('textbox', [0.45, 0.5, 0.5, 0.5], 'String', 'Global Title', ... 'FontSize', 14, 'Fo...

How can I give main title for multi-graphs?

figure; plot(rand(5,1)); annotation('textbox', [0.45, 0.5, 0.5, 0.5], 'String', 'Global Title', ... 'FontSize', 14, 'Fo...

ongeveer 3 jaar ago | 1

Answered

Replace missing cell entries without replacing whitespaces.

for i = 1:numel(A) if ismissing(A{i}) A{i} = 'REPLACED'; end end

Replace missing cell entries without replacing whitespaces.

for i = 1:numel(A) if ismissing(A{i}) A{i} = 'REPLACED'; end end

ongeveer 3 jaar ago | 1

Answered

Checking disjointness of Stateflow truth tables?

After waiting some years and looking into this several times, the answer is that disjointness checking is not supported.

Checking disjointness of Stateflow truth tables?

After waiting some years and looking into this several times, the answer is that disjointness checking is not supported.

ongeveer 3 jaar ago | 0

| accepted

Answered

How can I apply labels to project files when the project references another project?

I asked MathWorks about this. Propagating labels from a referenced project is not currently supported.

How can I apply labels to project files when the project references another project?

I asked MathWorks about this. Propagating labels from a referenced project is not currently supported.

ongeveer 3 jaar ago | 0

| accepted

Answered

Callback function not found for dynamically created app UI component

I ended up contacting MathWorks support for this. The solution is to call the function like so: app.DropDown = uidropdown(app.U...

Callback function not found for dynamically created app UI component

I ended up contacting MathWorks support for this. The solution is to call the function like so: app.DropDown = uidropdown(app.U...

ongeveer 3 jaar ago | 1

| accepted

Question

Callback function not found for dynamically created app UI component

I would like to dynamically/programmtically create a uidropdown component that calls a function when its value is changed. Howev...

meer dan 3 jaar ago | 3 answers | 1

Question

What is the best way to count the occurrences of two table columns together?

I have a table that looks like this: >> A = {'A'; 'B'; 'C'; 'A'; 'C'; 'C'; 'B'}; >> B = {'x'; 'y'; 'z'; 'xx'; 'z'; 'z'; 'y'}; ...

meer dan 3 jaar ago | 3 answers | 0

Answered

how to find the parameter name for any block in the simulink to use it in set_param command?

To programmatically find out what parameters a block has, get its handle: h = get_param(gcb, 'Handle'); or h = gcbh; and t...

how to find the parameter name for any block in the simulink to use it in set_param command?

To programmatically find out what parameters a block has, get its handle: h = get_param(gcb, 'Handle'); or h = gcbh; and t...

meer dan 3 jaar ago | 0

Answered

How to read a variable in set_param function?

set_param('Transient/Gain', 'Gain', A)

How to read a variable in set_param function?

set_param('Transient/Gain', 'Gain', A)

meer dan 3 jaar ago | 0

Answered

How to collect cyclomatic complexity of linked block?

To break links to libraries, you need to change the 'LinkStatus' parameter. For example: set_param('linked_block_name', 'LinkSt...

How to collect cyclomatic complexity of linked block?

To break links to libraries, you need to change the 'LinkStatus' parameter. For example: set_param('linked_block_name', 'LinkSt...

meer dan 3 jaar ago | 1

| accepted

Answered

Citing MATLAB products or relative webpage

@Misc{miller2021simscape, author = {Steve Miller}, url = {https://github.com/mathworks/Simscape-Multibody-C...

Citing MATLAB products or relative webpage

@Misc{miller2021simscape, author = {Steve Miller}, url = {https://github.com/mathworks/Simscape-Multibody-C...

meer dan 3 jaar ago | 0

| accepted

Answered

Modify Repmat function to concatenate array

If you want to understand how repmat works, take a look at the syntax and description in the documentation page: https://www.mat...

Modify Repmat function to concatenate array

If you want to understand how repmat works, take a look at the syntax and description in the documentation page: https://www.mat...

meer dan 3 jaar ago | 0