Answered
How can I run this code I don't know where is the fault?
As your output is a scalar value so you need to define it with Marker. and you are plotting only real values k1 = 2; k_1 = 1;...

2 years ago | 0

| accepted

Answered
read csv file with a lot of columns.
try this: A=readtable('rawdata.csv','ReadVariableName',false); B=table2array(A(:,1)); C=split(B,';'); output=C(:,2:125);

2 years ago | 0

Answered
I want to add a definite fixed intervals between my input data
try this: distance =[0 0 5 10 15 20]; C=cell(6,1); for i=1:length(distance)-1 C{i}= distance(i):1:distance(i+1); end o...

2 years ago | 0

| accepted

Answered
How to get the value corresponding to the data in an excel file
try this: A=readtable('katalog.xlsx','ReadVariableName',false); B=table2array(A(2:end,2:end)); D=str2double(string(B)); user...

2 years ago | 0

Answered
Having errors in a multivariable for loop.
try this: temp_int=24; temp_ext=10; U=5; hi=4; h=1:5; temp_diff=(U/hi)*(temp_int-temp_ext); x=0:0.1:2.5; X=repmat(x,size...

2 years ago | 1

Answered
Matlab is deleting first row of my table and setting it as table property VariableDescription
It should not work in that way.please try this A=readtable('filewithtable.csv','ReadVariableName',false);

2 years ago | 1

| accepted

Answered
If condition: "in each row of a matrix one element is zero and the other one is not zero"
try this A = [ 1 0 0 9 12 0 0 2 0 3]; if nnz(A)==size(A,1) disp('in each row one element is z...

2 years ago | 0

Answered
read multiple columns from an excel spreadsheet by using xlsread
I guess you can not export multiple ranges data in Matlab. Range must be of the form 'A1' (cell), 'A:B' (column-select), '1:5' ...

2 years ago | 0

Answered
How to change the input of the function
%define your variable and call your function T1 = 288.15; L = -0.0065; R = 287; PSL = 101325; g = 9.81; rhoSL = 1.225; [T...

2 years ago | 1

Answered
Create table columns with some entries blank (no quote symbols)
try this: str={'Y'}; col=[{'True'};{'True'};{'False'};{'True'};{'False'};{'True'}]; T=table(col); for i=1:size(col,1) if st...

2 years ago | 0

Answered
Reading a massive file but skipping several lines / rows at a fixed interval
try this loop: A=(1:9990)'; % making an array idx=2000; % taken value from 2000 count=(size(A,1)+10)/idx; first_index=A(1:...

2 years ago | 0

Answered
How to create a file and append a suffix?
% suppose you have a excel file with name "example" A=readtable('example.xlsx') % analyze what you want % save the file writ...

2 years ago | 0

Answered
Trying to change cells in a table
try this: Column1Names={'type_1';'type_2';'type_3';'type_4';'type_5'}; % making another table LastName = {'Sanchez';'Johnson'...

2 years ago | 0

| accepted

Answered
Compare two columns having different values.
try this: A={'a','b','c','d','e'}; B={'b','c','d','e','f'}; C={'a','-' 'b','b' 'c','c' 'd','d' 'e','e' '-.','f'}; a=[A(...

2 years ago | 0

Answered
Labels above bar-plot
please expand the plot for a clear view. A=1:5:200; B=1:40; bar(B) text(1:length(A),B,num2str(B'),'VerticalAlignment','botto...

2 years ago | 0

Answered
How to resolve issue while dealing with larger matrices?
A=randi(16,[4,4]); B=A(:)'; P=randi(16,[1 4]); V=randi(16,[1 4]); [C out]=ismember(V,B); if numel(out(out~=0)) ==4 d...

2 years ago | 1

Answered
how to define matirx series?
square bracket returns horizontal concatenation of input argument. i guess you can use a cell array c = {a1,a2,a3};

2 years ago | 0

Answered
How to define a text variable using an older text variable?
x=1:10; T = compose("batch1_%d.csv",x(:))

2 years ago | 1

Answered
How to replace zeros in a vector with random segments of the same vector?
try this: A=[1 2 3 0 0 0 4 5 0 0 0 0 0 0 0 0 8 9]'; % any matrix B=A(A==0); % extract the number of 0 rdnumber=randi([10 ...

2 years ago | 0

Answered
How do I extract column vectors from a cell of doubles array?
A=load('cell_of_doubles.mat'); B=A.cell_of_double_balls ; C=cell(size(B,2),1); for i=1:size(B,2) C{i}=B{1, i}(:,1:3); ...

2 years ago | 0

| accepted

Answered
Delete rows from string array with just one value
as i don't have your data so i have added NaN string to make the same dimension cell array x={'Na','Mg','Si' NaN; 'V' NaN NaN ...

2 years ago | 0

| accepted

Answered
readtable decide which coloumns are read as string and which as number. xlsx file
i have tried to make your excel and applied readtable function..see the result. A=readtable('example_2.xlsx','ReadVariableName'...

2 years ago | 0

| accepted

Answered
Why do I receive the error that arrays have incompatible sizes for this operation?
try this: A=input('initial value:'); B=input('number of values:'); C=input('final value:'); % A=2; % B=10; % C=20; D=A:(C...

2 years ago | 0

Answered
How to export a large array from workspace to an excel sheet [Ed. so that NaNs are preserved] ?
try this: A=[1 2 3; NaN 3 NaN; 4 NaN 7]; % made a matrix with Nan value B=num2cell(A) B(isnan(A)) ={'NaN'}; % NaN as a stri...

2 years ago | 0

| accepted

Answered
How can I reshape a square matrix to a rectangular matrix based on its adjacency list?
try this: A =[0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 0 1 0...

2 years ago | 3

Answered
how to adjust x-axis in plot
try repmat function: A=[30 2 4 6 8 10]; no_of_rows=1; no_of_repeated_times=3; B=repmat(A,no_of_rows,no_of_repeated_times)

2 years ago | 0

Answered
How to convert row-major linear indices to column-major indices?
try reshape function: A=[1 2 3 4 5 6; 7 8 9 10 11 12;13 14 15 16 17 18] % any matrix D=reshape(A,[],3)

2 years ago | 0

Answered
How to shuffle rows in pairs?
try this: A=randi([1 8],600,1); for i=1:size(A,1) if A(i)==1 A(i+1)=2; elseif A(i)==3 A(i+1)=4; ...

2 years ago | 0

Answered
Writing and Executing Formula in Excel by MATLAB
My approach: import the excel file into matlab >> Processing >> export into excel. str={'Matched'}; A=readtable('example.xlsx...

2 years ago | 0

Answered
Converting location of a 2x3 vector into a matrix with value 1
if 2nd one is your expecter output , then a = [1 3;2 4;7 8]; Z = zeros(10) ;% 10 x 10 matrix containing only zeros...

2 years ago | 1

Load more