已回答
list all 9 integer between -3.5 and 5.5
unique(fix(-3.5:5.5))

2 years 前 | 1

| 已接受

已回答
How to access the double cell 5*1 ?
Your question is not clear to me. If you just want to access your cell array. load('vims.mat'); f{1}(2,3) %first cell, row 2 c...

2 years 前 | 1

| 已接受

已回答
How to compare multiple variables against one and produce an answer for each comparison?
ON=5;BC=2;QC=4;AB=1; L=["ON","BC","QC","AB"];%put names in string array r=[ON,BC,QC,AB];%put all variables into a single array...

2 years 前 | 0

已回答
Read nth image from a folder and compare it with nth image from different folders and store the result
a=dir('F1/');b=dir('F2/');c=dir('F3/'); for k=1:length(a.name) i1=imread([a(k).folder,'/',a(k).name]); i2=imread([b(k...

2 years 前 | 0

已回答
How to assign sequence values to an specific column of a table?
size = [720 4]; Type = ["double","double","double","double"]; Names = ["Hours","PrEV","SoCEV","Gen"]; master = table('Size',s...

2 years 前 | 0

已回答
Finding min and max values in a structure
d=struct2cell(yourStruct); m=0;M=0; for k=1:length(d) m=min([m,d{k}]); M=max([M,d{k}]); end

2 years 前 | 0

已回答
Upload files with almost the same name in different components of a matrix
for k=1:1e4 s=sprintf('%08d.txt',k); spin(:,:,k)=load(['D:\Magnetic-Distribution\spins-',s]); end

2 years 前 | 0

已回答
I need help randomizing the points of the traingle
figure;hold on; for k=1:10 p=polyshape(rand(3,1),rand(3,1)); plot(p) end

2 years 前 | 0

已回答
Convert cell into double
Try using the following. m=readmatrix('yourData.txt','DecimalSeparator',',');

2 years 前 | 1

已回答
Help me plot grafic pls.
What is R? The solution does not match your graph. x=.5; t=0:.0025:.07; n=(1:100)'; H=1./n.^2.*sin(n*pi/1.5).*cos(100*n*pi/1...

2 years 前 | 0

已回答
Im trying to use gradient decent with a for loop to determine the value of x that minimizes the function
iterations = 10; alpha = 0.15; x = zeros(iterations,1); x(1) = -1; ...

2 years 前 | 1

已回答
subplot timeseries for mean monthly temperature, max monthly temperature and minimum monthly temperature
With matrix rows: year, month, min, mean, max f=find(diff(data(3,:))<0); f=[0,f,size(data,2)+1]; monthlyData=zeros(5,length(f...

2 years 前 | 0

已回答
Replicate matrix elements without for loop
base =[1 2; 3 4]; repelem(base,2,2)

2 years 前 | 0

| 已接受

已回答
average every sets of rows
a=20*rand(1629,1); k=7; e=floor(length(a)/k)*k; r=reshape(a(1:e),k,[]); M=mean(r)

2 years 前 | 0

| 已接受

已回答
cell array index mean
a=mean(cell2mat(monthly_average_cell));%why use a cell array? this matrix provides the answer

2 years 前 | 0

已回答
Switch signs to positive in the diagonal of a matrix
m=randi(10,6)-5 d=abs(diag(m)); M=m.*~eye(size(m))+diag(d)

2 years 前 | 0

| 已接受

已回答
Getting A Blank Plot From Code
Yp=62e9; Yfca=250e9; yfsi=480e9; d31=-320e-12; a=linspace(0,1); d31eff=-d31./((log(1-a)).*(1./a-0.5)); vp=1; d31multi=d31...

2 years 前 | 0

已回答
How to add proper values on top of bar chart
Y1 = [-31.6 15.8 -8.0]; subplot(3,2,2) Vn4a_diff=15.8;Vn4c_diff=-31.6;Vn4b_diff=8; b=bar(2,Vn4a_diff,'FaceColor',[0 0.6 0.3],...

2 years 前 | 0

已回答
Problem with if statements
e=["H","Li","Be","B","C","N","O","F","Na","Mg","Al","Si","P","S","Cl","K","Ca",... "Sc","Ti","V","Cr","Mn","Fe","Co","Ni","...

2 years 前 | 0

| 已接受

已回答
Is there a way to create a loop for reading multiple Excel files at once?
time=[130,230,330...]; for i= 1:length(time) lum(:,i)=csvread(sprintf('PAR_TOP_%d.csv',time(i)),3,2); end

2 years 前 | 0

| 已接受

已回答
The results display problem
A= [1.02 0.95 0.77 0.67 0.56 0.30 0.16 0.01]; b = [0.39 0.32 0.22 0.18 0.15 0.12 0.13 0.15]; for i = 1:4 num = 10.^(-i);...

2 years 前 | 0

| 已接受

已回答
How to Call a Function Within a Script?
%execute function dydt=vdp1000(t,y);%must assign t and y prior to executing the function function dydt = vdp1000(t,y) dyd...

2 years 前 | 0

已回答
Hi , i want to build a matrix
C=rand(1,3); B=rand(3,1); A=rand(3,3); n=size(A,1); a=eye(n); y=4; H=diag(repelem(C*B,n*y)); for k=-1:-1:-n*y+1 a=a+A^...

2 years 前 | 0

| 已接受

已回答
The summation of elements between two numbers
yourMatrix=rand(7,18)*90+10; s=sum(yourMatrix(yourMatrix>=35&yourMatrix<=55))

2 years 前 | 0

| 已接受

已回答
Solving equation with one variable but it is present in the equation twice
It is easy to just solve for x in your equation and have an equation in Vout. f=@(Vout)(211200-1000*Vout)./(Vout+211.2); f(100...

2 years 前 | 0

已回答
how to separate columns from txt file
Try: c = readtable("r4.4u_db.txt",'Format','%f %*c %f %*c%*c%*c %f %*c%*c');

2 years 前 | 0

已回答
Index exceeds the number of array elements. Index must not exceed 272.
What are you trying to do? You cannot index into mean_value_data_smoth with a value greater than its size (272). You are indexin...

2 years 前 | 0

已回答
How do you replace NaN values in column n with the average of the all the values in column n?
r=rand(9172,27); r(randi(247644,1,10000))=nan;%add some nan's m=mean(r,'omitnan'); [~,idx]=find(isnan(r)); r(isnan(r))=m(idx...

2 years 前 | 0

已回答
How to simplify a complicated output of a function with only double coefficients
Look at digits and vpa %just take the vpa of the result to however many digits of accuracy. digits 10 vpa(newton_interpolatio...

2 years 前 | 0

| 已接受

加载更多