Community Profile

photo

KL


Last seen: 1 year ago|Active since 2015

Statistics

全部
  • 12个月连胜
  • 指路明灯
  • 知识渊博的5级
  • Revival Level 1
  • 求解器
  • First Answer

查看徽章

Content Feed

查看

Answered
how to sum a vector without sum function
Your idea of using for loop is correct but you should use it to calculate the sum not the mean. If there's a vector A = [1,2,3,...

4 years ago | 1

Answered
automatically create a group of same elements from an array
try this, result =mat2cell(sort(A),1, histcounts(findgroups(A))) %A is your array Output is a cell array where you have...

4 years ago | 0

Answered
can anyone help me to change the numbering in y axis to some names, say 'X', 'Y','Z' ?
Just like how you've handled the X-Axis, set(gca,'YTicklabel',{'X','Y','Z'})

4 years ago | 0

|公认

Answered
I have data in the same excel workbook but in 10 different work sheets and i'm trying to run a loop that will read in the data from each work sheet consectutively.
您可以使用| xlsread |以及| xlsinfo |。[状态,表] = xlsfinfo(文件名);现在,您的所有表名称都没有...

4 years ago | 0

|公认

Answered
How can I use 'strcat' and 'for loop' to read my Excel data?
There are better ways to handle multiple files in MATLAB. But the main problem in your attempt is that you're not only trying to...

4 years ago | 1

|公认

Answered
将矩阵分配给结构
probably you mean something like this g.a(:,1)=[1 2 3 4]'; g.a(:,2)=[1 1 3 4]'; g.a(:,3)=[4 3 1 2]' c=[1 2] b=[...

4 years ago | 0

Answered
如何将单元阵列更改为3D阵列以加快计算?
转换| X |使用X_MAT = CAT(3,X {:})进入3D矩阵;然后,如果您想从所有页面中提取第五行,x ...

4 years ago | 0

Answered
how to get the all possible combination between two range of numbers
The example and description is a but confusing but if you ask _how to get the all possible combination between two range of numb...

4 years ago | 0

|公认

Answered
cell mean from each cells
每个单元格有多少行都没关系。可能您想要类似C = {Rand(50,7),Rand(30,7),Rand(100,7)}之类的东西;%...

4 years ago | 0

Answered
细胞阵列到矩阵
Use 3D matrices, it's a better idea. C_mat = cell2mat(permute(C,[1,3,2]))

4 years ago | 0

Answered
引用时间序列时,我可以参考日期,而不是元素索引号吗?
Use the dates to extract the desired indices. Look at the following example, % Create some dummy data t = datetime([2018 1 ...

4 years ago | 0

|公认

Answered
根据mod从列矢量中提取数据
为什么不简单地将矢量重塑为矩阵,而不是创建多个变量?x =(1:20);重塑(x,4,[])an ...

4 years ago | 2

Answered
计算3D阵列中二维的平均值
If you want the mean of all rows in every page(3rd dimension) mean(ImageROI,1) for columns in every page mean(ImageRO...

4 years ago | 0

Answered
Summing elements of an array
sum([P{:}]) But why would you store it in cell array? If they are all numeric, better use a numeric array.

4 years ago | 0

Answered
如何加入页面制作3D矩阵?
使用猫,猫(3,x,y)

4 years ago | 0

Answered
Adding elements of a matrix
我不完全确定您想要什么,但是如果您想计算所有RGB数字的平均值,并且具有1x3结果,则均值(Cell2 ...

4 years ago | 0

Answered
Loop through a vector with changing legth
why not use a while loop? idx = 1; while idx<=numel(z) %do something z = z(abs(z-z(idx)>=1)); idx = idx+1; ...

4 years ago | 0

|公认

Answered
如何解决错误“输入参数不足”。
这是一个 *函数 *。您应该通过输出= convert2GPS(输入)来调用它,请记住输入的大小。链接:

4 years ago | 0

Answered
How to repeat sample data in minutes?
Your variable name looks like you're working with irradiation, in that case I wouldn'r recommend interpolation for your simulati...

4 years ago | 1

Answered
帮助直方图图!
使用| bar3 |,bar3(矩阵)

4 years ago | 0

|公认

Answered
从单元阵列中删除值
如果您所有的阵列都具有一致的尺寸,则要简单得多。不过,与其他答案没有什么不同,只是与Cel ...

4 years ago | 1

Answered
import csv into mate
You're overwriting A everytime. Before you start the loop define A as a cell array, A = cell(numFiles,1) and then inside ...

4 years ago | 0

|公认

Answered
将零添加到与另一个矩阵的长度相同的矩阵中
_can I add zeros to the bold 360x3 matrix to make it 369x3 in one go?_ You say you want to add *9 rows* but you are trying to...

4 years ago | 0

|公认

Answered
Read data from file
Something quick, d = readtable('whole res.txt'); d = table2cell(d); d = regexprep(d,' ',''); d = cellfun(@str2do...

4 years ago | 0

Answered
Index exceeds matrix dimensions help
There are so many issues. Let's address your error first. Your counter variable |n| is bigger than the size of your |y| vector (...

4 years ago | 0

|公认

Answered
如何比较规格限制
用逻辑掩码进行v1 = 0.16;v1_ll = 0.36;v1_ul = 0.66;v1(v1 v1_ul)= v1_ul;

4 years ago | 0

Answered
如何将所有迭代保存到工作区
在每次迭代中,您都在覆盖alpha。替换| alpha |用| alpha(c)|然后将保存命令移到循环外...

4 years ago | 1

Answered
Entering a vector in a function with if else statement
恐怕您对| sorted_data(i-1)== nan |总是会返回false。找到是否值是NAN使用| i ...的正确方法

4 years ago | 0

Answered
使函数接受向量
这称为元素操作。当您写| x^2 |时,Matlab尝试查找| x*x |但是当您编写|x。^2 |时,它会计算...

4 years ago | 0

Answered
How do I fill a column and/or row vector with the j-th/i-th sums of a magic matrix' vectors?
如果我理解正确的话,你想妈妈ke the sum of rows and columns, mag = rand(4); r = sum(mag,1); c = sum(mag,...

4 years ago | 0

Load more