Community Profile

photo

Arif Hoq


Last seen: 3 dagen ago Active since 2021

Programming Languages:
MATLAB
Spoken Languages:
English

Statistics

All
  • 3 Month Streak
  • Knowledgeable Level 4
  • Knowledgeable Level 3
  • Community Group Solver
  • First Answer
  • Thankful Level 3
  • Solver

View badges

Content Feed

View by

Answered
how to make a code that guess the color of the string variable stored ?
try this: mywords = "sulaman is here"; ht = text(0.8,0.8,mywords,'color','b'); A = input('whats my favourite color ? ','s'); ...

ongeveer een maand ago | 0

| accepted

Answered
Trouble using readtable function
you need to specify the file with single quotation. TGWAS = readtable('AD_magma_genes.txt')

ongeveer een maand ago | 0

| accepted

Answered
Convert matrix with 3 columns ([day month year]) into one string dd/mm/yyyy with each part taking value of one column
try this: A=[1 3 1981 28 3 1982 23 3 1983 9 5 1984 27 3 1985 15 2 1986 19 2 1987 16 4 1988 20 3 1989]; T=table(A(:,1),...

ongeveer een maand ago | 0

| accepted

Answered
How to find the closest value to the average in an array?
Then average will be 4.14, which is closest to 4. actually average is 4. you can try this: a=[1,2,3,4,6,6]; average=mean(a) ...

ongeveer een maand ago | 0

Answered
How to delete in a table a row which contains a specific word
try with this: A=readtable('andrea_file.csv','ReadVariableNames',false,'HeaderLines',3); B=table2cell(A); C=string(B) [row c...

ongeveer een maand ago | 1

| accepted

Answered
How to Create/Modify for matrices or matrix
try this: K=5 matA=1:K; % matB=[matA matA matA matA matA] % matB=[1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5] matB=r...

ongeveer een maand ago | 0

| accepted

Answered
Getting the entry value (i,j) for the minimum value of reach row of a matrix
may be you are looking for this: A=[11 13 15 12 14 16 32 18 21]; mincol=min(A) % min value of eac...

ongeveer een maand ago | 1

Answered
How to delete in a table a row which contains a specific word
as you did not attach your file, i have attached my own created data A=readtable('myfile.xlsx','ReadVariableNames',false); B=t...

ongeveer een maand ago | 1

Answered
I have a cell array 1x7 and every matrix contains 5844x4double and they're all same size. Now i need to extract data from each cell array and each matrixe(5844x4double ) and t
how can I attached the mat data? just right click on the mat file > save as > put any name. here I have tried to make a cell a...

ongeveer 2 maanden ago | 0

| accepted

Answered
Assigning Null / Multi-Dimensional Matrix
vectorized solution is the most efficient and simple. But, still if you need for loop, try this x=1:5; A = repmat(x,4,1); fo...

ongeveer 2 maanden ago | 0

| accepted

Answered
changing similar numbers in a raw
try this: X=[1 2 2 2 3 2 4 2 2 2]; a=X(X==2); b=randperm(length(a)); a=b; X(X==2)=0; X(X==0)=a

ongeveer 2 maanden ago | 0

Answered
how to plot the curve in matlab
A=[57 78.2 165.1 87 67.06 101.8 107 64.66 88.7 257 61.43 63.58 507 61.45 61.47 1007 60.51 60.91]; x=A(:,1); Y1=A(:,2...

ongeveer 2 maanden ago | 0

| accepted

Answered
Index exceeds the number of array error
var = randi(100,20,20); [val,idx] = max(var(:)) [x, y] = find(var == val) idx2=2; x0 = x(idx2) y0 = y(idx2) here your idx=...

ongeveer 2 maanden ago | 0

| accepted

Answered
exporting a .mat file to csv/ xls
you have to extract your data from the struct. here i am giving an example. i have attached a struct structvalue=load('data2.ma...

ongeveer 2 maanden ago | 0

| accepted

Answered
How to name the sheet in excel using MATLAB
try this: writetable(T,'test.xlsx','FileType','spreadsheet','Sheet','a') % T is your output variable

ongeveer 2 maanden ago | 2

| accepted

Answered
How can we find the block name in simulink. actually i have one block but i dont know that block name how can i find from simulink library
Double click on that block. you can find the name on Block Parameters pop up window

ongeveer 2 maanden ago | 0

Answered
multiplying matrix by a vector on an element by element basis using for loops
try this: A = [1 12 22 10 18; 20 8 13 2 25; 6 19 3 23 14; 4 24 17 15 7; 11 21 16 5 9]; B = [9 7 11 4 23]; for i = 1:size(A,1)...

ongeveer 2 maanden ago | 0

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;...

ongeveer 2 maanden 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);

ongeveer 2 maanden 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...

ongeveer 2 maanden 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...

ongeveer 2 maanden 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...

ongeveer 2 maanden 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);

ongeveer 2 maanden 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...

ongeveer 2 maanden 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' ...

ongeveer 2 maanden 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...

ongeveer 2 maanden 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...

ongeveer 2 maanden 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:...

ongeveer 2 maanden 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...

ongeveer 2 maanden 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'...

ongeveer 2 maanden ago | 0

| accepted

Load more