Community Profile

# 埃博拉酱

Last seen: 2 days ago Active since 2019

All

#### Content Feed

View by

Submitted

Submitted

Image5D - OIR, TIFF

Submitted

Submitted

Submitted

Saving output files as input file names while running though a for loop
filenames = struct2table(dir('*.csv')).name; %%% Start looping over files for k= 1:numel(filenames) X= readmatrix(filenam...

1 month ago | 0

Automatically create variable names
NameIndex=1; Value=2; eval(sprintf('Name_%u=%d',NameIndex,Value)); This is possible by eval but as mentioned in the comments ...

1 month ago | 0

MEX file debugging with MS Visual Studio
As @Friedrich said, MEX file functions are loaded dynamically, so the function needs to be called once in MATLAB to load symbols...

1 month ago | 0

Solved

Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

2 months ago

Problem

Integer vector optimal lossless deduplication
You're given an integer vector A, a Min scalar and a Max scalar. You can assume all elements in A are in [Min,Max] range, and nu...

2 months ago | 2 | 2 solvers

Submitted

Submitted

Problem

Is the number of 1s in a binary integer odd or even?
Your function should turn the input integers into binary form and count the number of 1s in the binary. If the number is odd, re...

4 months ago | 1 | 15 solvers

Problem

Ambiguous concatenation
Give two expressions that can have different meaning inside/outside a concatenation expression.

6 months ago | 0 | 3 solvers

Submitted

MATLAB 括号 语法 大全 Parentheses Syntax
MATLAB三大括号()[]{}傻傻分不清？用法经常搞混？各种出错不知道该用哪个？本示例列出了MATLAB三大括号的所有语法，全网最详尽最全面！吃透了它你就再也不会有问题！

Solved

Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

8 months ago

Compare strings which contains the same pattern by ignoring case sensitivity and some expressions like underscores
You might remove those expressions to be ignored and unify the strings all to lowercase before doing actual comarison.

9 months ago | 0

| accepted

How to I create variables with different names in the workspace using for loop?
You're too new to MATLAB to write any actual code. Learn your first course on https://matlabacademy.mathworks.com/ before doing...

9 months ago | 0

Solved

Curry a function handle
From Wikipedia, Currying: In mathematics and computer science, currying is the technique of converting a function that takes mu...

10 months ago

Problem

Merge structs on fields
Merge a bunch of structs into one, containing the field names and corresponding values of all input structs. For duplicate field...

10 months ago | 0 | 4 solvers

Solved

Exhaust all possible logical vectors
Input a length argument and list all possible logical vectors of that length. My solution is of size 29. Can you find an even s...

11 months ago

Solved

Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

11 months ago

Problem

Exhaust all possible logical vectors
Input a length argument and list all possible logical vectors of that length. My solution is of size 29. Can you find an even s...

11 months ago | 1 | 17 solvers

Solved

Undocumented MATLAB tricks No. 2 - Tell the parfor index
Your function is called in multiple for-loops, and the loop indices are given to your function. One of these indices are from a ...

11 months ago

11 months ago | 0

| accepted

Question

Index=find(Array==Element); Array(Index)=0 上述代码往往会被提示可以省略find，直接使用逻辑索引而不是数值索引。 省略一个函数调用当然会更快，这不难理解。 但如果Index还将要继续用于后续其它数组的索引...

11 months ago | 1 answer | 0