Answered
Remove a row from an array
I don't quite understand. Do you mean that if a row from grid also appears as a row in yx, then that row should be removed from...

6 years ago | 0

| accepted

Answered
Adding Matrices to make Bigger Matrix
Here is a straightforward way to do it with a for loop: A{1} = [ 1 -1; -1 1]; A{2} = [ 2 -2; -2 2]; ...

6 years ago | 0

| accepted

Answered
Compare two tables and extract the columns similar to both
If I understand correctly, then C = B(:,ismember(B(1,:),A)) does what you want. From your example, it looks like A is a row v...

6 years ago | 0

| accepted

Answered
I have a question about gathering same numbers together in a matrix
If M is your matrix, then M_sorted = sortrows(M,3) will output M sorted by the 3rd column, maintaining the order of the other ...

6 years ago | 0

Answered
Compare two matrix row by row and check if at least one row is different, enter the if loop
The expression all(ismember(A,B,'row')) will be true if every row of A is represented in B, and false if not.

6 years ago | 1

Answered
Generation of rundon numbers with different scales
You aren't very specific, but the following will generate random values scaled by the value in M. r = 0.1*M.*randn(size(M))

6 years ago | 0

Answered
Why is Matlab PCA calculation different from results from R and Orange3?
Here's my guess: The difference between R and MATLAB is that in R, you scaled the data, in addition to centering them -- each c...

6 years ago | 2

Answered
Char to cell array of strings
output = regexp(c,'BL[\d.]*','match'); where c is your input character array. That will actually give a cell array of characte...

6 years ago | 0

| accepted

Answered
Unmatched parameter name error when connecting to a PostgreSQL database
Sorry for the delayed reply, and I truly don't know if this will help or not. It does not seem to directly related to your error...

6 years ago | 0

Answered
data labels in plot- in code
Use the legend command.

6 years ago | 0

| accepted

Answered
Change size 3D matrix
I think what you want is to use permute(EP(f,:,:),[2 3 1]) as the input, instead of just EP(f,:,:), so that you have a 2-d mat...

6 years ago | 0

Answered
Assigning a special character to a value
You can use the isvarname function to determine if something is a valid MATLAB variable name. The naming rules are here. (I sup...

6 years ago | 0

Answered
Issue with vectors?
Sorry to be snarky, but did you trying reading the error message? It tells you what to do right there. x = 0:.05:1; y = exp(-...

6 years ago | 0

Answered
When using listdlg, what is the value assigned when the user exits without making a selection?
Quoting the documentation for listdlg ... "If the user clicks Cancel, presses Esc, or clicks the close button in the dialog box...

6 years ago | 0

| accepted

Answered
Unmatched parameter name error when connecting to a PostgreSQL database
I am not able to test this right now, but it seems possible to me that MATLAB wants single quotes instead of double quotes aroun...

6 years ago | 0

Answered
How to add a matrix data to cell array?
var1 = {'a' 'b' 'c'}; var2 = [1 2 3]'; var1(2:4,2) = num2cell(var2)

6 years ago | 0

Answered
Table, how to replace all values less than X with Y in specific column
% Create a table with two variables a = [1;2;3]; b = [4;5;6]; tbl = table(a,b); % For one of the variables, replaces valu...

6 years ago | 0

| accepted

Answered
Adding new column of data from loop
x = zeros(10,3); for i = 1:3 v = rand(10,1); x(:,i) = v; end

6 years ago | 1

Answered
readtable is interpreting columns of numbers from excel wrong
Which column looks wrong to you? I notice, for example, that the RodDiametermm columns looks like it is all numeric at the top ...

6 years ago | 1

| accepted

Answered
Why is my function not working?
Is everything on a single line, as you posted it here? If so, then everything after the first "%" is a comment, and MATLAB will ...

6 years ago | 0

Answered
How to get actual value instead of answer in terms of exp and pi as a output in matlab program
I think there must be some other difference, not just being in a loop. It looks like somehow you have the Symbolic Math Toolbox ...

6 years ago | 0

Answered
How to remove rows of empty strings?
I'm having trouble following the logic in the command you posted, because you seem to be checking only the second column of Busn...

6 years ago | 1

Answered
Interpolate among Datasets so one set matches the other
% Data from your file that has both x and y x1 = [2 3 5]; y1 = [1 2 3]; % Data from your file that has ...

6 years ago | 1

Answered
obtain specific components of a matrix
M = 8; N = 13; L = 19000; TKE_d = reshape(permute(reshape(TKE_t,N,M,L),[2,1,3]),M*N,L); where TKE_t=transpose(TKE); as y...

6 years ago | 1

| accepted

Answered
Disp() is not showing the whole sentence in the command window
Did you use square or curly brackets when you defined "note"? Square brackets will concatenate the two strings, and should disp...

6 years ago | 1

Answered
i want to fill matrix with some numbers
If you have the Statistics and Machine Learning Toolbox: % Inputs v = [50,90,60,73,55,96,47,63,555,46,756,968,453,452,500]; M...

7 years ago | 0

Answered
How to replace a function by a value
Conceptually, something like this? weightEstimate = initialWeightEstimate while <some condition> geometryEstimate = geome...

7 years ago | 1

| accepted

Answered
How do I create dummy variables for this task?
If you have access to the Statistics and Machine Learning Toolbox, then the dummyvar command could be helpful for you.

7 years ago | 0

Answered
Finding differences between two vectors in an explicit way.
% Input vectors vec1 = [5 4 2 1 3 1 1 1 4]; vec2 = [5 4 2 5 3 2 1 2 2]; % Identify the mismatched rows, and create a matrix...

7 years ago | 0

| accepted

Answered
Find the number of 1s in sections of a logical array
sum(reshape(A,288,[]))' where A is your original array.

7 years ago | 1

| accepted

Load more