Community Profile # KSSV

Last seen: Today 2011 以来アクティブ

Professional Interests: Mathematical Computing

#### Statistics

All
• • • • • • • • • • • • バッジを表示

#### Content Feed

How to get the file names that start with the same letter in the folder?
f = dir('T*.bin') ; N = length(f) ; for i = 1:N f(i).name end

1日 前 | 0

| 採用済み

find ID's of repeated values in array
[c,ia] = ismember(t2,t1)

1日 前 | 0

Create a function based on some criteria
if x <= 0 y = -1 ; elseif x > 0 && x <= 5 y = x^3 ; elseif x > 5 y = x^2 ; end

1日 前 | 0

| 採用済み

How to save output of double loop?
A = zeros(n,m) ; for i=1:n for j=1:m A=myfunction(...); % assuming output of the function is 1x1 end e...

1日 前 | 1

How can I detect constant signal patch from whole signal by using matlab script ?
x = 0:0.1:10; y = gaussmf(x,[2 5]); % Introduce constant value [val,idx] = max(y) ; idx0 = idx:idx+10 ; y(idx0) = val ; ...

1日 前 | 0

How to plot 2D Linear Inequality?
[x1,x2]=meshgrid(0:.1:10,0:.1:10); cond1=x1-x2<=-2; cond2=-0.3*x1-x2<=-8; cost=0.4*x1.^2-5*x1+x2.^2-6*x2+50; figure (1)...

1日 前 | 0

| 採用済み

Function readtable: how to insert the value of a variable double in the directory
f = dir('C:\Users\hp\OneDrive\Project\Results\'); f(3) f(4)

2日 前 | 0

How to plot velocity profile?
T = readtable('Atq16.xlsx') ; data = table2array(T) ; plot(data(:,2:end),data(:,1),'-or')

2日 前 | 0

| 採用済み

Reading .rec files ( mutiple .rec files)
For .edf files you can use this file exchange function: https://in.mathworks.com/matlabcentral/fileexchange/31900-edfread For ...

3日 前 | 0

How to find uaci by fixing one image and changing the other?
A = imread('whatever_is_A') ; B_images = dir('*.png') ; % you are in the folder of images and give extension N = length(B_...

3日 前 | 1

| 採用済み

I want to cut a vector into even number of terms in a loop
save_T = 35; if mod(save_T,2)==0 % is even continue else save_T=save_T-1;

3日 前 | 0

| 採用済み

Need help in plotting contour of speed, torque and eff
scatter(eff,speed,[],torque,'filled') You cannot plot contour with the given data. You have 1D data. You need to have 2D data...

3日 前 | 0

How to solve many equations at once? (Not a system but just multiple separate equations)
You get the solution for x in terms of Pm first. This will be a symolic xpression. In that you can substiture your Pm values to ...

3日 前 | 0

Histogram fit with curved fitting
You are expecting like this? v = randn(1000,1) ; h = histogram(v) ; i = h.BinEdges ; x = mean([i(1:end-1)' i(2:end)'],...

3日 前 | 0

| 採用済み

Putting array in function to graph
x = 0 : 0.1 : 2; y = 0.7*(x.^2).*(1+0.2*(x.^2)).^-3.5 ; figure(1) plot(x,y) grid

3日 前 | 0

Extracting rows in row-wise manner. How to do this?
Question sounds very silly. You can use a lloop. A = rand(100,4) ; B = zeros(100,4) ; for i = 1:100 thisrow = A(i,:) ...

3日 前 | 0

How to generate multiple .stl files in a loop?
You are overwriitng the stl files. Always you are using the same name to .stl file. You need to give different filename; check t...

3日 前 | 0

| 採用済み

How can I sort data from an excel file and assign ID's to binary classes?
You need not to use a loop. You can go by inequalities, where you will get logical indices as output. The logical indices have 1...

3日 前 | 0

How do I fit a surface to this data properly?

3日 前 | 0

Cannot use "v>=0"?
while rem(v,2)~=0 | v>=0

3日 前 | 0

| 採用済み

How to merge two tables, keeping independent variable (x) the same but summing the dependent variable (y)
T1 = readtable('Confoss_landings.xls') ; T2 = readtable('Mainefoss_landings.xls') ; [idx,ia] = ismember(T2.(1),T1.(1)) ; ...

3日 前 | 0

| 採用済み

How to generate a rhythm in Matlab?
n = 2 ; % number of 0's l = 4 ; % length of array m = l-n ; % number of 1's iwant = [repelem(0,n) repelem(1,m)] ; % ra...

3日 前 | 1

| 採用済み

Make 3d sphere plot from net of sphere
clc; clear all ; I = imread('cameraman.tif') ; [m,n] = size(I) ; [X,Y,Z] = sphere(m-1,n-1) ; surf(X,Y,Z,flipud(I),'...

3日 前 | 0

| 採用済み

how to draw a number of circle inside large circle having same origin but different radius
r = linspace(0,1,10)' ; % Radii th = linspace(0,2*pi) ; C = [0 0] ; % Center x = cos(th) ; y = sin(th) ; X = C(1)...

3日 前 | 1

How to create a new matrix with a for loop?
You should not create individual arrays like that. You should proceed something like this iwant = zeros(3,100) ; iwant(i,:) =...

3日 前 | 0

find a value between two points
Read about interp1. If you have curve data as (x,y), at the point xi you can seek the value using: yi = interp1(x,y,xi)

3日 前 | 0

Projecting a point along normal direction
You may use this file exchange function: https://in.mathworks.com/matlabcentral/fileexchange/32696-2d-line-curvature-and-normals...

4日 前 | 0

| 採用済み

Correctly plot the quiver on a figure
Try changing (x,y) i.e. use (y,x) instead.

4日 前 | 0

Sort a Matrix by the first column connecting the row elements so that the elements of the second column 'follow' those of the first.
A = rand(10,2) ; [val,idx] = sort(A(:,1)) ; iwant = A(idx,:)

4日 前 | 0

| 採用済み

If same value apperas in array count +1
input = [ 1 2 3 4 1 2 3 4 1 2 3 4 ]; a = reshape(input,[],3)' ; [c,ia,ib] = unique(a,'rows') ; ib

4日 前 | 1