Answered

write node to cell center

I got the problem..I think you want to do the following. A = xlsread('NODETOSELL.csv') ; % read the file node_vals = A(:...

write node to cell center

I got the problem..I think you want to do the following. A = xlsread('NODETOSELL.csv') ; % read the file node_vals = A(:...

9 days ago | 0

Answered

Finding Lines in a Large Text File with a Specific Text

Read about textscan. This function gives you option of running a loop and reading required chunks (lines) of the file. In these ...

Finding Lines in a Large Text File with a Specific Text

Read about textscan. This function gives you option of running a loop and reading required chunks (lines) of the file. In these ...

9 days ago | 0

Answered

Keep positive real values from a cell inside a matrix

Let A be your cell. Convert cells into matrix using: A = cell2mat(A) ; Pick the real parts of A using: A = real(A) ; Pic...

Keep positive real values from a cell inside a matrix

Let A be your cell. Convert cells into matrix using: A = cell2mat(A) ; Pick the real parts of A using: A = real(A) ; Pic...

9 days ago | 0

Answered

find Nan in cell

Use isempty..not isnan A={[],[],[31],[2,1]}; %first case A1={[],[2],[3],[6]}% second case P=cellfun(@(x) isempty(x),A,'Un...

find Nan in cell

Use isempty..not isnan A={[],[],[31],[2,1]}; %first case A1={[],[2],[3],[6]}% second case P=cellfun(@(x) isempty(x),A,'Un...

9 days ago | 1

| accepted

Answered

How do I extract the highest and lowest data from MATLAB figures?

Use max and min.

How do I extract the highest and lowest data from MATLAB figures?

Use max and min.

10 days ago | 0

Answered

How to process .txt files in a folder to be read by readtable?

txtfiles = dir('*.txt') ; N = length(txtfiles) ; data = cell(N,1) ; for i = 1:N data{i} = readtable(txtfiles(i).name, '...

How to process .txt files in a folder to be read by readtable?

txtfiles = dir('*.txt') ; N = length(txtfiles) ; data = cell(N,1) ; for i = 1:N data{i} = readtable(txtfiles(i).name, '...

10 days ago | 0

Answered

Finding Data in a loaded file

Let A be your data and you want to seek b from it. idx = find(abs(A-b)<10^-5)

Finding Data in a loaded file

Let A be your data and you want to seek b from it. idx = find(abs(A-b)<10^-5)

10 days ago | 0

Answered

Checking for multiple values that are the same in a vector

B=[1,2,3,4,4,4,4,5,6,7,8] ; [a,b]=hist(B,unique(B)) ; [b' a']

Checking for multiple values that are the same in a vector

B=[1,2,3,4,4,4,4,5,6,7,8] ; [a,b]=hist(B,unique(B)) ; [b' a']

10 days ago | 0

Answered

Find monthly mean from daily data of same year using find function

REad about datevec. This will give you years, months and days. Using the months and your data you can find mean. Let thedates be...

Find monthly mean from daily data of same year using find function

REad about datevec. This will give you years, months and days. Using the months and your data you can find mean. Let thedates be...

10 days ago | 0

| accepted

Answered

How to insert a 3D model into a graph?

Read the data from stl using: https://in.mathworks.com/matlabcentral/fileexchange/6678-stlread https://in.mathworks.com/help/m...

How to insert a 3D model into a graph?

Read the data from stl using: https://in.mathworks.com/matlabcentral/fileexchange/6678-stlread https://in.mathworks.com/help/m...

10 days ago | 0

Answered

How to link two given points and add isolines to a plot?

It looks like you have three curves i.e three different set of (x,y) arrays corresponding to Red, Blue and Green. Also you three...

How to link two given points and add isolines to a plot?

It looks like you have three curves i.e three different set of (x,y) arrays corresponding to Red, Blue and Green. Also you three...

10 days ago | 0

| accepted

Answered

how can I plot particular rows of a matrix?

If A is your data...and you want to plot ith row; use plot(A(i,:))

how can I plot particular rows of a matrix?

If A is your data...and you want to plot ith row; use plot(A(i,:))

11 days ago | 0

Answered

extract the most repeated element of a cell array

clc; clear all ; A={[],[18],[14],[],[],[],[14],[],[14],[18]}; B = cell2mat(A) [a,b]=hist(B,unique(B)) ; [b' a']

extract the most repeated element of a cell array

clc; clear all ; A={[],[18],[14],[],[],[],[14],[],[14],[18]}; B = cell2mat(A) [a,b]=hist(B,unique(B)) ; [b' a']

11 days ago | 0

| accepted

Answered

How to print value in 3 column table

Read about scatteredInterpolant n = 10 ; x = rand(n,1) ; y = rand(n,1) ; z = rand(n,1) ; F = scatteredInterpolant(x,y,z) ...

How to print value in 3 column table

Read about scatteredInterpolant n = 10 ; x = rand(n,1) ; y = rand(n,1) ; z = rand(n,1) ; F = scatteredInterpolant(x,y,z) ...

11 days ago | 0

Answered

Selecting 3 Random Elements from a list Without Repetition

Read about nchoosek. P = [375.7,515.3,432.3,530.7,454.4,490.7,503.4,449.9,509.0,447.2,474.2,398.3,410.6] ; idx = nchoosek(1:...

Selecting 3 Random Elements from a list Without Repetition

Read about nchoosek. P = [375.7,515.3,432.3,530.7,454.4,490.7,503.4,449.9,509.0,447.2,474.2,398.3,410.6] ; idx = nchoosek(1:...

11 days ago | 0

| accepted

Answered

Index a matrix multiplied by a time dependent function

U = zeros(2,2,length(ft)) ; for i = 1:length(ft) U(:,:,i) = exp(-1i.*ft(i)./2).*Z.*exp(1i.*mi.*E(i).*ft(i)).*V.*Z1.*i...

Index a matrix multiplied by a time dependent function

U = zeros(2,2,length(ft)) ; for i = 1:length(ft) U(:,:,i) = exp(-1i.*ft(i)./2).*Z.*exp(1i.*mi.*E(i).*ft(i)).*V.*Z1.*i...

11 days ago | 0

| accepted

Answered

Remove outliers from signal

USe this: https://in.mathworks.com/matlabcentral/fileexchange/24885-remove-outliers

Remove outliers from signal

USe this: https://in.mathworks.com/matlabcentral/fileexchange/24885-remove-outliers

11 days ago | 0

Answered

Saving a text file as a time step array

YOu can save the required into a matrix using: iwant = zeros([],3) ; count = 0 ; for nn = 1:TMAX if mod(nn,10)=...

Saving a text file as a time step array

YOu can save the required into a matrix using: iwant = zeros([],3) ; count = 0 ; for nn = 1:TMAX if mod(nn,10)=...

11 days ago | 1

| accepted

Answered

How to add values to a vector

To add/ append A = rand(1,10) ; B = zeros(1,2) ; iwant = [A B] To Remove A = rand(1,12) A(11:12) = []

How to add values to a vector

To add/ append A = rand(1,10) ; B = zeros(1,2) ; iwant = [A B] To Remove A = rand(1,12) A(11:12) = []

11 days ago | 0

| accepted

Answered

Point tracker - get koordinates

Some thing like this: P = cell([],1) ; V = P ; count = 0 ; while ~isDone(videoFileReader) frame = step(videoFileR...

Point tracker - get koordinates

Some thing like this: P = cell([],1) ; V = P ; count = 0 ; while ~isDone(videoFileReader) frame = step(videoFileR...

11 days ago | 2

| accepted

Answered

tree-ring detection !!!

How about this approach? I = imread('image.png') ; I1 = imcrop(I) ; % cropping the required part % imshow(I1) I2 = ...

tree-ring detection !!!

How about this approach? I = imread('image.png') ; I1 = imcrop(I) ; % cropping the required part % imshow(I1) I2 = ...

12 days ago | 2

Answered

how to read lots of file and plot them

files = dir('*.txt') % Give your extension N = length(files) ; % total number of files % loop for each file for i = 1...

how to read lots of file and plot them

files = dir('*.txt') % Give your extension N = length(files) ; % total number of files % loop for each file for i = 1...

12 days ago | 0

Answered

How to convert a closed curve into a binary mask

data = importdata('data.txt') ; x = data(:,1) ; y = data(:,2) ; N = 500 ; xi = linspace(min(x),max(x),N) ; yi = lins...

How to convert a closed curve into a binary mask

data = importdata('data.txt') ; x = data(:,1) ; y = data(:,2) ; N = 500 ; xi = linspace(min(x),max(x),N) ; yi = lins...

12 days ago | 0

| accepted

Answered

"Contour not rendered for non-finite ZData" warning, working fine on Mathematica?

[x,y] = meshgrid(-5:0.25:5); z = (x.^2 + y.^4)./sqrt(4.*x.^2 + 4.*y.^2); contour3(x,y,z) YOu forgot to put ./ (element by ele...

"Contour not rendered for non-finite ZData" warning, working fine on Mathematica?

[x,y] = meshgrid(-5:0.25:5); z = (x.^2 + y.^4)./sqrt(4.*x.^2 + 4.*y.^2); contour3(x,y,z) YOu forgot to put ./ (element by ele...

13 days ago | 0

| accepted

Answered

How to plot global temperatures interpolated on world map from a mat file

A=load('T_file.mat'); T_file = double(T_file) ; lon=A(:,1); lat=A(:,2); z=A(:,3); lon0 = min(lon) ; lon1 = max(lon) ; l...

How to plot global temperatures interpolated on world map from a mat file

A=load('T_file.mat'); T_file = double(T_file) ; lon=A(:,1); lat=A(:,2); z=A(:,3); lon0 = min(lon) ; lon1 = max(lon) ; l...

13 days ago | 0

Answered

i get an error .whats wrong ? Subscript indices must either be real positive integers or logicals. Error in (line 54) CC(j)=bitxor(mode(R(ii)+CC(j-1),256),K(i));

CC(j)=bitxor(mode(R(ii)+CC(j-1),256),K(i)); The above line got multiple issues. YOu need to rethink your code. Think of the fol...

i get an error .whats wrong ? Subscript indices must either be real positive integers or logicals. Error in (line 54) CC(j)=bitxor(mode(R(ii)+CC(j-1),256),K(i));

CC(j)=bitxor(mode(R(ii)+CC(j-1),256),K(i)); The above line got multiple issues. YOu need to rethink your code. Think of the fol...

13 days ago | 0

Answered

How to extract interpolated values from a table

REad about interp1 and interp2.

How to extract interpolated values from a table

REad about interp1 and interp2.

15 days ago | 0

Answered

Only keep rows with the same names from multiple excel files

Load the files using either xlsread or readtable. YOu can get the common data from both the files using either ismember or int...

Only keep rows with the same names from multiple excel files

Load the files using either xlsread or readtable. YOu can get the common data from both the files using either ismember or int...

16 days ago | 0

Answered

Writing data to a structure array without loop

https://in.mathworks.com/matlabcentral/answers/259291-how-to-add-values-to-structure-array-without-loop

Writing data to a structure array without loop

https://in.mathworks.com/matlabcentral/answers/259291-how-to-add-values-to-structure-array-without-loop

16 days ago | 0