
Programming Languages:
MATLAB
Spoken Languages:
English
MATLAB
Spoken Languages:
English
Content Feed
답변 있음
Picking array elements based their values (largest, second largest,...)
Y=[1 1 0 0 6 5 4 7 7]; a=unique(Y); [ii,ij] = sort(a,'descend'); Largest=ii(1) second_largest=ii(1+1) third_largest=ii(1+2)...
Picking array elements based their values (largest, second largest,...)
Y=[1 1 0 0 6 5 4 7 7]; a=unique(Y); [ii,ij] = sort(a,'descend'); Largest=ii(1) second_largest=ii(1+1) third_largest=ii(1+2)...
1일 전 | 0
| 수락됨
답변 있음
How to rearrange matrix columns?
A=[0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0...
How to rearrange matrix columns?
A=[0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0...
3일 전 | 0
| 수락됨
답변 있음
How to prepare extract monthly Data from a group of data?
a=table2array(readtable("AO_1950_2022.xlsx")); b=a(:,2)==2; febmonth=a(b,[1 3]);
How to prepare extract monthly Data from a group of data?
a=table2array(readtable("AO_1950_2022.xlsx")); b=a(:,2)==2; febmonth=a(b,[1 3]);
3일 전 | 0
답변 있음
Not enough input arguments (line 2)
x=12:10:42; out=nonsense(x); function y=nonsense(x) if mod(x,2) == 0 y=x.^2; else y=0; end disp(y) end
Not enough input arguments (line 2)
x=12:10:42; out=nonsense(x); function y=nonsense(x) if mod(x,2) == 0 y=x.^2; else y=0; end disp(y) end
4일 전 | 1
답변 있음
How to have function window show over command window?
Click the little 'downward pointing triangle' on the right top of title bar. Then select the "dock" option. https://www.mat...
How to have function window show over command window?
Click the little 'downward pointing triangle' on the right top of title bar. Then select the "dock" option. https://www.mat...
4일 전 | 0
문제를 풀었습니다
Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...
5일 전
답변 있음
How to import a dataset in .mat file for data pre-processing?
a=load('your mat file.mat');
How to import a dataset in .mat file for data pre-processing?
a=load('your mat file.mat');
7일 전 | 0
| 수락됨
답변 있음
read data from csv
use readtable function a=readtable("0.csv","ReadVariableNames",false);
read data from csv
use readtable function a=readtable("0.csv","ReadVariableNames",false);
16일 전 | 0
답변 있음
Insert NaN into specific values
try this: s=load('spi_dca.mat'); spi_dca = s.spi_dca; col4=spi_dca(:,4); col4(col4==0)=NaN; output=[spi_dca(:,[1 2 3]),col4...
Insert NaN into specific values
try this: s=load('spi_dca.mat'); spi_dca = s.spi_dca; col4=spi_dca(:,4); col4(col4==0)=NaN; output=[spi_dca(:,[1 2 3]),col4...
21일 전 | 0
| 수락됨
답변 있음
My function won't accept the vector
You can not specify 0 as an index x = 0:1:10; f = x.^2-x-1
My function won't accept the vector
You can not specify 0 as an index x = 0:1:10; f = x.^2-x-1
21일 전 | 1
| 수락됨
답변 있음
stacked figure from text file
A=horzcat((1:10)',randi(20,10,1),randi(100,10,1)); figure(4); plot (A(:,1),A(:,2),'-o', 'LineWidth',1, 'Color', [0 0.4470 0.74...
stacked figure from text file
A=horzcat((1:10)',randi(20,10,1),randi(100,10,1)); figure(4); plot (A(:,1),A(:,2),'-o', 'LineWidth',1, 'Color', [0 0.4470 0.74...
약 1달 전 | 0
| 수락됨
답변 있음
Finding index in a set
one approach: x1 = [0 , 0, 1, 0]; x2 = [0, 0, 0, 0]; % [value I]=find(x1==1); b=perms(x1); [row,col,v] = find(b(:,3)); b(r...
Finding index in a set
one approach: x1 = [0 , 0, 1, 0]; x2 = [0, 0, 0, 0]; % [value I]=find(x1==1); b=perms(x1); [row,col,v] = find(b(:,3)); b(r...
약 1달 전 | 0
답변 있음
How to get back real value after rounding
a=[3.3 0.5]; round_vector=round(a) c=a-round_vector; origin_vector=round_vector+c
How to get back real value after rounding
a=[3.3 0.5]; round_vector=round(a) c=a-round_vector; origin_vector=round_vector+c
약 1달 전 | 0
답변 있음
Having this problem second time can anyone help?
a=1.1; b=0.09; % x(1)=1.16; % x(2)=1.32; % x(3)=1.47; % x(4)=1.65; % x(5)=1.93; x=[1.16;1.32;1.47;1.65;1.93]; % y=(l...
Having this problem second time can anyone help?
a=1.1; b=0.09; % x(1)=1.16; % x(2)=1.32; % x(3)=1.47; % x(4)=1.65; % x(5)=1.93; x=[1.16;1.32;1.47;1.65;1.93]; % y=(l...
약 1달 전 | 0
답변 있음
Removing Variables From a Cell Array
x = {2 4 3+5*1i NaN 6 9.8 'Hello' 11 -3 -4+6*1i}; x(cellfun(@(x) any(isnan(x)),x)) = [] y = {NaN NaN -7 8 0 4.5 1i 15 'how are...
Removing Variables From a Cell Array
x = {2 4 3+5*1i NaN 6 9.8 'Hello' 11 -3 -4+6*1i}; x(cellfun(@(x) any(isnan(x)),x)) = [] y = {NaN NaN -7 8 0 4.5 1i 15 'how are...
약 1달 전 | 0
답변 있음
Assembling Global Stiffness Matrix
% creating stiff matrix for i=1:20 stiff{i}=randi(100,4,4); end k1=stiff(1); k2=stiff(2); k3=stiff(3); k4=stiff(4);...
Assembling Global Stiffness Matrix
% creating stiff matrix for i=1:20 stiff{i}=randi(100,4,4); end k1=stiff(1); k2=stiff(2); k3=stiff(3); k4=stiff(4);...
약 2달 전 | 0
답변 있음
How do I average columns in cell array if some cells are empty?
you are asking the same question several times. your cell array "new_mat". giving an answer to your previous question: https://...
How do I average columns in cell array if some cells are empty?
you are asking the same question several times. your cell array "new_mat". giving an answer to your previous question: https://...
약 2달 전 | 0
답변 있음
How do I convert a cell array with multiple values per cell into a numerical array with multiple rows?
The dimension of the 4th Column of your cell array is 4x1, but the rest of your cell array is 5x1. a=load("split_newdata_mean.m...
How do I convert a cell array with multiple values per cell into a numerical array with multiple rows?
The dimension of the 4th Column of your cell array is 4x1, but the rest of your cell array is 5x1. a=load("split_newdata_mean.m...
약 2달 전 | 0
| 수락됨
답변 있음
Insert numeric values (rx1 matrix) inside a cell
a=randi(100,157,2); b=randi(200,189,2); c=randi(300,183,2); mat={a;b;c} % making a cell array % rep = repmat(100,157,1); m...
Insert numeric values (rx1 matrix) inside a cell
a=randi(100,157,2); b=randi(200,189,2); c=randi(300,183,2); mat={a;b;c} % making a cell array % rep = repmat(100,157,1); m...
약 2달 전 | 0
| 수락됨
답변 있음
How to locate the index of a certain date for a date-time array?
I don't have your data. try this one: % creating datetime data from 1st January 2017 to 31 December 2017 firstdate = '01-01-20...
How to locate the index of a certain date for a date-time array?
I don't have your data. try this one: % creating datetime data from 1st January 2017 to 31 December 2017 firstdate = '01-01-20...
약 2달 전 | 0
답변 있음
How to import odd and even rows from a more than one txt file ?
try this: textfiles = dir('*.txt'); numfiles = length(textfiles); mydata = cell(1, numfiles); for k = 1:numfiles mydata...
How to import odd and even rows from a more than one txt file ?
try this: textfiles = dir('*.txt'); numfiles = length(textfiles); mydata = cell(1, numfiles); for k = 1:numfiles mydata...
약 2달 전 | 0
답변 있음
How to remove empty space after legend?
you can change your lengend location to "northwest" or "Southeast" legend(LegendInfo, 'Location', 'northwest', 'fontname', 'Tim...
How to remove empty space after legend?
you can change your lengend location to "northwest" or "Southeast" legend(LegendInfo, 'Location', 'northwest', 'fontname', 'Tim...
약 2달 전 | 0
답변 있음
Finding a value of one vector based on the nonzero values of another vector
A = [2 5 1 4]; B = [0 1 0 1]; [I C]=find(B==1); output=A(C)
Finding a value of one vector based on the nonzero values of another vector
A = [2 5 1 4]; B = [0 1 0 1]; [I C]=find(B==1); output=A(C)
약 2달 전 | 0
답변 있음
[Ask Help] - Convert Negative Commas Decimal into Single Binary
data = [1.295175 -0.021158 -0.274017]; data(data<0)=0; data(data>1)=1
[Ask Help] - Convert Negative Commas Decimal into Single Binary
data = [1.295175 -0.021158 -0.274017]; data(data<0)=0; data(data>1)=1
약 2달 전 | 0
| 수락됨
답변 있음
Black Jack input and output
try this: a=[9 13]; output_1=check_possibilities(a) b=[23 34]; output_2=check_possibilities(b) c=[9 20 19 22]; output_3=ch...
Black Jack input and output
try this: a=[9 13]; output_1=check_possibilities(a) b=[23 34]; output_2=check_possibilities(b) c=[9 20 19 22]; output_3=ch...
약 2달 전 | 0
답변 있음
MATLAB maximum value under a certain value
a=[ 23, 19, 12,18,30,17,20,28,21,65,22,31]; b=a(a>=17 & a<=21) % elements between greater equal 17 and smaller equal 21 maxi...
MATLAB maximum value under a certain value
a=[ 23, 19, 12,18,30,17,20,28,21,65,22,31]; b=a(a>=17 & a<=21) % elements between greater equal 17 and smaller equal 21 maxi...
약 2달 전 | 0
| 수락됨
답변 있음
I am having this error, could you help?
try this: a=1.6; b=0; % x(1)=1.28; % x(2)=1.36; % x(3)=2.47; % x(4)=3.68; % x(5)=4.56; x=[1.28;1.36;2.47;3.68;4.56];...
I am having this error, could you help?
try this: a=1.6; b=0; % x(1)=1.28; % x(2)=1.36; % x(3)=2.47; % x(4)=3.68; % x(5)=4.56; x=[1.28;1.36;2.47;3.68;4.56];...
약 2달 전 | 0
답변 있음
How to save the output of each loop in .csv file?
if your "result " is in matrix form, then try this result=randi(100,100,20); % making text files for j=1:size(result,2) col=...
How to save the output of each loop in .csv file?
if your "result " is in matrix form, then try this result=randi(100,100,20); % making text files for j=1:size(result,2) col=...
약 2달 전 | 1
답변 있음
how to extract subset from dataset?
a=readtable("NF.xlsx"); aa=find(strcmp(a.Attack,'DDoS')); aaa=a(aa,:)
how to extract subset from dataset?
a=readtable("NF.xlsx"); aa=find(strcmp(a.Attack,'DDoS')); aaa=a(aa,:)
약 2달 전 | 0
| 수락됨