Answered

Inter runnable variables not imported for init runnable

This is limitation. However you already noted you can use PIM (Per-instance-memory) for this purpose instead of IRV.

Inter runnable variables not imported for init runnable

This is limitation. However you already noted you can use PIM (Per-instance-memory) for this purpose instead of IRV.

4 months ago | 0

Answered

when i am saving workspce of function , it's not containing all variables.

There may not be direct function available to merge two workspace data directly. If you would like to save base workspace and f...

when i am saving workspce of function , it's not containing all variables.

There may not be direct function available to merge two workspace data directly. If you would like to save base workspace and f...

7 months ago | 0

| accepted

Answered

Have an array of 16 values, want to output them in order value by value, with the same string of text before each value

Use for loop: amount = [a, b, c, d, e, f]; for i=1:length(amount) disp(['The amount is: ',amount(i)]); end

Have an array of 16 values, want to output them in order value by value, with the same string of text before each value

Use for loop: amount = [a, b, c, d, e, f]; for i=1:length(amount) disp(['The amount is: ',amount(i)]); end

7 months ago | 0

Answered

Deleting last element of a nested structure

To remove filed from structure check rmfield. Example: s.a = 1; s.b = 2; s.c = 3; Remove field b. field = 'b'; s = rmfiel...

Deleting last element of a nested structure

To remove filed from structure check rmfield. Example: s.a = 1; s.b = 2; s.c = 3; Remove field b. field = 'b'; s = rmfiel...

7 months ago | 0

Answered

how to get Model advisor report name?

Check example: Generate Report with Specified Name and Location temp = generateReport(app,'Location',FolderLocation); [RptPth...

how to get Model advisor report name?

Check example: Generate Report with Specified Name and Location temp = generateReport(app,'Location',FolderLocation); [RptPth...

8 months ago | 0

Question

Matlab Unit test for structure input. How to use same test for n numbers.

I have a matlab unit test class. Here i am using setup method to form structure i.e. 'testCase.out' this structure have n values...

8 months ago | 2 answers | 0

Answered

If statement for identifying row/column vectors/matrix/scalars

'isrow' function returns true if input is row vector. isrow(in) 'iscolumn' function returns true if input is column vector....

If statement for identifying row/column vectors/matrix/scalars

'isrow' function returns true if input is row vector. isrow(in) 'iscolumn' function returns true if input is column vector....

8 months ago | 1

Answered

why this code can't run in my PC but can run in another. it show error about "Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters"

Looks like bracket close ')' missing for G1 & G2: G1=(round(255*(F/255).^gamma1)) G2=(round(255*(F/255).^gamma2))

why this code can't run in my PC but can run in another. it show error about "Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters"

Looks like bracket close ')' missing for G1 & G2: G1=(round(255*(F/255).^gamma1)) G2=(round(255*(F/255).^gamma2))

8 months ago | 0

Answered

How to make this code in loop - Image processing

Loop to read images: my_folder =pwd; %Folder path where images are present filenames=dir(fullfile(my_folder,'*.jpg')); Image ...

How to make this code in loop - Image processing

Loop to read images: my_folder =pwd; %Folder path where images are present filenames=dir(fullfile(my_folder,'*.jpg')); Image ...

8 months ago | 0

Answered

How to read a text file line by line and store its element into two arrays.

Check: Table = readtable('InputFile.txt'); %Read text file in table format FirstColumn = Table(:,1); % First column data S...

How to read a text file line by line and store its element into two arrays.

Check: Table = readtable('InputFile.txt'); %Read text file in table format FirstColumn = Table(:,1); % First column data S...

8 months ago | 0

Answered

Loading image files in the workspace from a folder

Check: my_folder =pwd; %Folder path where images are present PngFilenames=dir(fullfile(my_folder,'*.png')); JpgFilenames=dir...

Loading image files in the workspace from a folder

Check: my_folder =pwd; %Folder path where images are present PngFilenames=dir(fullfile(my_folder,'*.png')); JpgFilenames=dir...

8 months ago | 0

Answered

string comparison database and label comparison

%use Compare strings strcmp(T(:,1),string(label)) %or Compare strings (case insensitive) strcmpi(T(:,1),string(label)) Che...

string comparison database and label comparison

%use Compare strings strcmp(T(:,1),string(label)) %or Compare strings (case insensitive) strcmpi(T(:,1),string(label)) Che...

8 months ago | 0

Answered

How to operate on different rows of the same matrix?

Try this: [A(1,1) A(2,1)] %[1 2] [A(1,1) A(3,1)] %[1 3] [A(1,1) A(4,1)] %[1 4] [A(2,1) A(3,1)] %[2 3] [A(2,1) A(4,1...

How to operate on different rows of the same matrix?

Try this: [A(1,1) A(2,1)] %[1 2] [A(1,1) A(3,1)] %[1 3] [A(1,1) A(4,1)] %[1 4] [A(2,1) A(3,1)] %[2 3] [A(2,1) A(4,1...

8 months ago | 0

Answered

Sorting Vector A in Ascending order and apply the same steps to Vector B

[m n]=sort(A); disp(m); % Sorted A vector in ascending order B=B(n); disp(B);% Sorted B according to A.

Sorting Vector A in Ascending order and apply the same steps to Vector B

[m n]=sort(A); disp(m); % Sorted A vector in ascending order B=B(n); disp(B);% Sorted B according to A.

8 months ago | 0

Answered

calculate an output signal based on user input data

Use input command to get user input Input = input('Enter input value: '); 2. To calculate power use Input^3 ...

calculate an output signal based on user input data

Use input command to get user input Input = input('Enter input value: '); 2. To calculate power use Input^3 ...

8 months ago | 0

Answered

want to read 38 csv files only first and second column?

csvFile = dir("*.csv") ; N = length(csvFile) ; for i = 1:N data = readtable(csvFile(i).name) ; iwant = data.Point...

want to read 38 csv files only first and second column?

csvFile = dir("*.csv") ; N = length(csvFile) ; for i = 1:N data = readtable(csvFile(i).name) ; iwant = data.Point...

8 months ago | 0

| accepted

Answered

How to first form a variable and then assign values to it?

Switch ..case can be one option. Var='Temperature'; switch Var case 'Temperature' Temperature=[1; 5; 3; 7]; ...

How to first form a variable and then assign values to it?

Switch ..case can be one option. Var='Temperature'; switch Var case 'Temperature' Temperature=[1; 5; 3; 7]; ...

8 months ago | 0

Answered

Error using zeros, Size inputs must be scalar. Need help with this error in my function.

If you are inputing, Enter the length of the vector : 2 (any scalar value) then it will work m = zeros(1,length(ln)) 2....

Error using zeros, Size inputs must be scalar. Need help with this error in my function.

If you are inputing, Enter the length of the vector : 2 (any scalar value) then it will work m = zeros(1,length(ln)) 2....

8 months ago | 0

Answered

How can I extract the usernames and hosts from a .txt file

You can use readtable to read text file into table format. file = 'data_file.txt'; opts = detectImportOptions(file ); T=readt...

How can I extract the usernames and hosts from a .txt file

You can use readtable to read text file into table format. file = 'data_file.txt'; opts = detectImportOptions(file ); T=readt...

8 months ago | 0

| accepted

Answered

How do I plot specific data from an export excel file?

Example: Then you need plot of Value1 vs Value2 of country 'Canada' : table=readtable('test1.xlsx'); Data= contains((table...

How do I plot specific data from an export excel file?

Example: Then you need plot of Value1 vs Value2 of country 'Canada' : table=readtable('test1.xlsx'); Data= contains((table...

8 months ago | 0

Answered

Matlab Function find sum of Euclidean distances from a given 2-D point

Use docsearch 'Euclidean'. https://www.mathworks.com/help/releases/R2019b/matlab/ref/norm.html#bt0y64c-1 Use norm to calculate...

Matlab Function find sum of Euclidean distances from a given 2-D point

Use docsearch 'Euclidean'. https://www.mathworks.com/help/releases/R2019b/matlab/ref/norm.html#bt0y64c-1 Use norm to calculate...

8 months ago | 0

Answered

one size image for CNN

You can checkout imresize function to make image sizes to be equal. https://www.mathworks.com/help/releases/R2019b/matlab/ref/i...

one size image for CNN

You can checkout imresize function to make image sizes to be equal. https://www.mathworks.com/help/releases/R2019b/matlab/ref/i...

8 months ago | 1

| accepted

Answered

How to store data of FOR LOOP iteration?

You can use P_new(i) or P_new{i} to store loop result.

How to store data of FOR LOOP iteration?

You can use P_new(i) or P_new{i} to store loop result.

8 months ago | 0

| accepted

Answered

generating files using loop or other functions

Use readtable and writetable functions. Data=readtable('x1)Data.xlsx'); % Read excel data [R,C]=size(Data); % get number of co...

generating files using loop or other functions

Use readtable and writetable functions. Data=readtable('x1)Data.xlsx'); % Read excel data [R,C]=size(Data); % get number of co...

8 months ago | 0

| accepted

Answered

How can I resize all images within a cell array?

This could work if your images are size of [MxNx3]: for i=1:length(image_content) ResImage{i}=imresize(image_content{i},[2...

How can I resize all images within a cell array?

This could work if your images are size of [MxNx3]: for i=1:length(image_content) ResImage{i}=imresize(image_content{i},[2...

8 months ago | 0

| accepted

Answered

NaNs when reading from table

As there are empty fields within your csv file, MATLAB read it as NAN(not a number). Thought could be: Create a data in csv s...

NaNs when reading from table

As there are empty fields within your csv file, MATLAB read it as NAN(not a number). Thought could be: Create a data in csv s...

8 months ago | 0

Answered

Suggestion on what im doing wrong.

The 'min' function and for loop will help: A=[8 1 -2 9 5 11 6]; n=2; % Exclude 2 smallest elements for i=1:n [num,id]=min(...

Suggestion on what im doing wrong.

The 'min' function and for loop will help: A=[8 1 -2 9 5 11 6]; n=2; % Exclude 2 smallest elements for i=1:n [num,id]=min(...

8 months ago | 0

Answered

Convert patch Matlab to file STL

Check this: https://www.mathworks.com/help/releases/R2019b/matlab/ref/stlwrite.html https://www.mathworks.com/help/releases/R2...

Convert patch Matlab to file STL

Check this: https://www.mathworks.com/help/releases/R2019b/matlab/ref/stlwrite.html https://www.mathworks.com/help/releases/R2...

8 months ago | 1

| accepted

Answered

How to rearrange a cell array with a given index vector

change semicolon to comma to seperate 2 & 3 from id: idx = [2,3,1];

How to rearrange a cell array with a given index vector

change semicolon to comma to seperate 2 & 3 from id: idx = [2,3,1];

8 months ago | 0

| accepted