Answered
how do i read random jpeg frames from a folder?
% assuming your image file names are in sequence as 1.jpg,2.jpg,..., 2000.jpg n_imges = 10; % number of random images you wa...

6 years ago | 0

| accepted

Answered
why does matlab use 8 bytes to memorize a number like 1 for example
MATLAB software takes the defualt value storage memory for numeric a value is double precision floationg value that is 64 bit v...

6 years ago | 0

Answered
Plotting Issue with code
MATLAB operator "/" does Solve systems of linear equations, use "./" operator instead for element wise division operation funct...

6 years ago | 0

Answered
cell to a matrix
Your FV1 matrix has empty cells this leads to dimension concatenate consistent error so you need to replace those empty cells wi...

6 years ago | 0

| accepted

Answered
How to find Distance Between two points ?
a = [ 0.1, 0.1, 0.2, 0.5, 0.22]; % your vector dist = cell(1, length(a)-1); % your distance cell matrix empty initializ...

6 years ago | 1

Answered
New to Matlab- How to import a text file for analysis that contains numbers and characters?
Using textscan command you can get the required data from the input text file, data would be extracted in the cell data type tr...

6 years ago | 0

Answered
a Simple Matrix question
Matrix_C = matrix_A; matrix_C(ismember(matrix_A, Matrix_B)) = 255;

6 years ago | 0

Answered
Merging Arrays in a Struct and Sorting them
result = sort(struct2array(v), 'ascend')

6 years ago | 0

| accepted

Answered
Combining multiple plots in 1 graph
I have used for loops to read and plot signals % filename = 't1-1.txt'; % assuming your files are in present working directory...

6 years ago | 0

| accepted

Answered
How would I create a matrix from the following strings
data = fileread('ThinPlateNodes.txt'); % read file(it is in text) ext_data = regexp(data, '[^{\]]+(?=})', 'match'); % get data...

6 years ago | 1

Answered
How to include header text in a Table when writing to Excel?
In table to array conversion only one type of the data will be displayed, head(string) would skipped. If you want to write dat...

6 years ago | 0

| accepted

Answered
Read a file contains hexdecimal complex numbers, and convert decimal complex numbers
data = fileread('real_imag.txt'); % read data in all char data_hex = regexp(data, '[\d\w]*', 'match'); % divide all into ...

6 years ago | 0

| accepted

Answered
help!!! with plot
MATLAB operator "/" performs linear equation solver, apply dot elemetwise(./) division clear; a=200;b=5;cm=10;cr=3;v=600;k=6;...

6 years ago | 0

Answered
Combine variables with different number of element in cell
You can write the data using tablewrite, onsets{1} = [84.0190 156.0190 192.0190 266.0190 84.0190 156.0190 192.0190 266...

6 years ago | 0

| accepted

Answered
Take an specific number from text file
Suppose your data is in the text file datafile.txt txt = fileread('datafile.txt'); val = str2num(cell2mat(erase(extractBetween...

6 years ago | 1

Answered
How to show part of a nested structure as a vector?
seine_1_data = cellfun(@str2num, struct2cell(all_seines.seine_1));

6 years ago | 0

Question


Exact string match to confirm the string existence in the file
Hi all, Could you find the exact string match in the input file? I am unable get exact match of the sting in the read file, i ...

6 years ago | 2 answers | 0

2

answers

Answered
how to inisialization number of cluster
[~, I] = max(Val); % index of max value Val(I) = 3;

6 years ago | 0

Answered
my code doesnt show a graph even if i use the plot command
Here variable A is complex number. So MATLAB automatically recognise as complex value and plot as real values of the complex num...

6 years ago | 0

Answered
how to conver a string to a array or matrix
J must be initialized scaler values, J = 2; % assumed(must a single value 1x1 size) a='[0 1;J 2]'; result = eval(a);

6 years ago | 0

Answered
How can I remove rows with only zeros if the first column has the row names?
You can do this in table/cell data type of variable a here i am taking table data type Your variable a in table initialization ...

6 years ago | 0

| accepted

Answered
exctract column from files
data = importdata('New Text Document.txt'); x = cellfun(@(x)strsplit(x, ','), data, 'UniformOutput', false); result = cell2mat...

6 years ago | 0

Answered
How can I create n arrays of size 100 each with random integer values?
c = cell(1,100); for i = 1:100 c{i} = randperm(100); end

6 years ago | 0

Answered
I want to display my result in a output file but idk how to do that.
xlswrite('output_file.xlsx', [cellstr(num2str(grade)), cellstr(data.grade)]);

6 years ago | 1

| accepted

Answered
How to get specific data from specified rows and variables in a table?
S = A -table2array(Table(1, 2)); % where Table(1, 2) indicates 1 row second column i.e Sensitivity values of "COB4_St1" For ...

6 years ago | 0

Answered
Force stop the program if the input doesn't satisfies some conditions
b=('another input= '); %Not really necessary. while 1 a=input('input any number less than or equal to 0,01= '); if a<...

6 years ago | 0

| accepted

Answered
while loop: storing changing variables
i = 1; T1 = %%initial temperature tmp = zeros(1, 100000); % initialize temparature with zeros of length 100000 tmp(1) = ...

6 years ago | 0

Answered
How to skip values in matrix and plot it properly
As of my knowledge, we can't plot NaNs so there is 3 points are visible in your plot as A = [0, 0, 3, 4, 0, 0]; B = [0, 1, 4, ...

6 years ago | 1

Answered
How to execute files without specifying a path.
You can but Files shold be in present working directory Program(here xxx.exe) should set to environmental variable if it is no...

6 years ago | 0

Answered
Looping each pixel of matrix image
If input image is color image X = imread('img.jpg'); Val = zeros(numel(X)); % initialize pdf values storing variable with...

6 years ago | 0

Load more