A répondu
Expected one output from a curly brace or dot indexing expression, but there were 4 results.
Could you specify, what are you trying to do? The error because of punneeSquare of size 5x5 and you are trying to assign one va...

environ 4 ans il y a | 0

A répondu
How can I extract values of last three columns in a matrix when second column value is 2?
data = readmatrix('icon.txt'); req_data = data(data(:, 2)== 2, end-2:end); If you are using MATLAB older version than R2019a ...

environ 4 ans il y a | 0

| A accepté

A répondu
Multiple specific elements in an array
Assuming a, b,c, d, ..g are values in the vector say X X = 1:7; sum([2:4].*[sum(reshape(x(1:6), 2,3))]);

environ 4 ans il y a | 1

A répondu
writing in excel in loop in matlab
First get the all data (A1, A2, A3...) as one(say A) variable using loops, after loop ending write variable A (whole data) to ex...

environ 4 ans il y a | 0

A répondu
How to Read and plot CSV file and delete infinity values from CSV file
opt = detectImportOptions('sensor.csv', 'MissingRule', 'fill', 'NumHeaderLines', 2); T = readtable('sensor.csv', op); header =...

environ 4 ans il y a | 0

A répondu
How to assign timetable as cell type?
Suppose TT is your timetable variable cell_array = table2cell(timetable2table(TT)); %timetable to cell

environ 4 ans il y a | 0

| A accepté

A répondu
Select values from cell array with condition using cellfun
Res = A(find(~cellfun(@(x)any(x>5 | x<-5, 'all'), A)));

environ 4 ans il y a | 0

| A accepté

A répondu
How do I create a matrix that expands with new column vectors added to it?
% it is recommended to prellocate x before operation but in your case x is not predetermined so assign columns directly n = 5; ...

environ 4 ans il y a | 0

| A accepté

A répondu
How to condense a plot with a shorter x-axis?
Normalize your data t = 1:1000000; % assumed data d = linspace(0, 1, numel(t)); % create vector of length t from 0 to 1 p...

environ 4 ans il y a | 0

A répondu
add zero time in timeseries date time column
Suppose dt is date time series, apply dt.Format = 'dd/MM/yyy HH:mm:ss'

environ 4 ans il y a | 0

| A accepté

A répondu
Finding matching strings from a table and making a new table
T_1 = T(strcmp(T.A, 'AFG'), :);

environ 4 ans il y a | 1

| A accepté

A répondu
Plotting graph with for-end loop in
%Setting all original variables Em=2.4e9; Ef=76e9; vm=0.34; vf_samll=0.22; theta=30; Vf=0:0.1:1; Ex = zeros(1, length(Vf)...

environ 4 ans il y a | 1

| A accepté

A répondu
I have a c file written using mex functions, run by Matlab using mex compiler. Now I want to run those mex type .c files without Matlab environment. So, is there any way to convert mex type .c file to normal .c file.
You can convert an apple to juice, but it is like to convert back juice to an apple For more info based MATLAB experts saying ...

environ 4 ans il y a | 0

| A accepté

A répondu
How to select certain columns of a matrix only when the values in the 4th row are bigger than three values of the other four rows in that particular column?
mat = abs(your matrix say urmat); ind = mat(4,:)>mat([1:3, 5], :); ind_4 = ind(4,:); desired_col = urmat(:, ind_4); % or m...

environ 4 ans il y a | 0

A répondu
Accepting multiple inputs in the form of an array
n_entr = 6; low_lim = 1; high_lim = 100; arr = zeros(1, n_entr); c = 1; fl =1; while fl in = input('Enter unique valu...

environ 4 ans il y a | 0

A répondu
Shift array by one element backwards or forward
x = -5:5; % array fr = circshift(x, 1); % forward bk = circshift(x, -1); % backward

environ 4 ans il y a | 1

| A accepté

A répondu
Delete rows or column with NaN for a cell array
nan_loc = cellfun(@(x)any(isnan(x)), P_QC, 'UniformOutput', false); for ii=1:length(P_QC) P_QC{ii}(:,nan_loc{ii}) = []; e...

environ 4 ans il y a | 1

| A accepté

A répondu
Coding a quadratic root finder
You no need to do program to find roots of the quadratic quation, MATLAB has built in command roots a=input('a=') b=input('b='...

environ 4 ans il y a | 0

A répondu
How to extract data in excel file in matlab
data = readmatrix('2014-2015 KU Basketball.xlsx'); [val, ind] = max(data(:, 2)); game_num = data(ind, 1);

environ 4 ans il y a | 0

A répondu
How to Access and Rename Doubles that are Stored in a Large Cell
You no need to rename every elecment(500x100 double) of the cell which leads much complications, you can perform your operation...

environ 4 ans il y a | 1

A répondu
How to generate a fixed number of float numbers and their sum is a fixed float number?
This can help you ! res = randfixedsum(9, 1, 0.7, 0,1)

environ 4 ans il y a | 0

A répondu
How to copy columns in a matrix.
1) res = circshift(mat, [0 -1]); % mat assumed as your matrix 2) mat = [zeros(size(mat, 1),1), mat] % Append zeros as firs...

environ 4 ans il y a | 0

A résolu


Find the index of elements in a string vector
In the vector of v, find the index of elements specified by a. v = ["Lion","Koara","Elephant","Snake","Dog","Cat","Camel"]; ...

environ 4 ans il y a

A répondu
Rounding numbers below 0.7 to 0.7
efficiency_final(efficiency_final<0.7) = 0.7

environ 4 ans il y a | 0

| A accepté

A répondu
Locating entered vector values
ind = find(ismember(x, a))

environ 4 ans il y a | 1

| A accepté

A répondu
How to store corrcoef values?
If the size of the corrcoef is consistent through out the loop % row = should write the rows of the corrcoef result % col = s...

environ 4 ans il y a | 0

A répondu
I having error in fileID=fopen(filename). Anyone can help with it? thanks
That means your are trying to run function without giving input filename. You should run the function in script file or command ...

environ 4 ans il y a | 0

A répondu
Delete files with specific sizes
Get the directory files files = dir('your directory'); Apply loop and delete with your condition for ii = 1:length(files) ...

environ 4 ans il y a | 1

| A accepté

A répondu
Problem creating video mp4 from animation.
VideoWriter % correct one you have give videowriter(not case sensitive)

environ 4 ans il y a | 1

| A accepté

A répondu
how can I read huge asc files with textread?
Get file names and apply ext_date = datetime(extractBetween(<your file name(here ppt_19990101_asc)>, '_', '_'), 'Format', 'yyy...

environ 4 ans il y a | 0

Charger plus