Beantwortet
How to disable termination character while setting up serial object?
The matlab documentation provides all property values except that on how to disable the termination character. How about the 'T...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
while loop matrix problem
@galgool, before calling someone wrong please learn the language properly, in particular how if works when given a vector as an ...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
write table to .xls document with variable (cell array) not splitting into different cells
You can convert your elements column into text with: A.elements = cellfun(@num2str, A.elements, 'UniformOutput', false); If yo...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
Is there a program that allows a user to run a matlab script outside the software?
Mathworks offer a number of toolboxes that allows you to convert matlab code into something standalone, see Matlab coder and pro...

fast 7 Jahre vor | 2

Beantwortet
How to sort a table within groups
I don't think you can use varfun for this. This is how I'd do it: group = findgroups(yourtable.Date); ordering = cell2mat(spli...

fast 7 Jahre vor | 0

Beantwortet
how to change white background to black and black foreground to white?
The logical not operator is ~ (or you can use not): invertedI = ~BW %or invertedI = not(BW)

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
how to get the only variable in file .mat autoumaticly
Your function signature is incomplete. Hopefully, you do know how to write a function properly. function FAmax = somename(vecto...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
creating complex MATLAB struct in C++ without using MATLAB Engine
The documentation of the mat-file format 5 is publicly available, so you can use that to construct your mat file. Unfortunately...

fast 7 Jahre vor | 0

Beantwortet
How can I count specific value in one column but based on another four columns
Assuming that your dara is in a table (it would be useful if the example used valid matlab syntax): result = groupsummary(yourt...

fast 7 Jahre vor | 2

Beantwortet
Creating combination matrix of all combinations
Use ndgrid and expansion of cell arrays into comma-separated lists : function c = cartprod(varargin) %c = allcomb(v1, v2, ...

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
Delete empty field - rows in a structure
As commented, you may want to use a table instead of a structure. tables are a lot easier to use: t_track20 = struct2table(trac...

fast 7 Jahre vor | 2

Beantwortet
How do I get every combo of a two vectors to put into an equation?
It's really not clear what your if statements are meant to do since you wrote some calculations that are not assigned to anythin...

fast 7 Jahre vor | 0

Beantwortet
How to convert 24-bit signed hex from .csv file to an array of decimal data?
I agree with Jan that sscanf is nicer and for that reason: dataTable = readtable('demo.csv'); dataDec = rowfun(@(s) sscanf(s, ...

fast 7 Jahre vor | 2

Beantwortet
Select and remove/replace values in matrix
One way: nelems = 2; %number of elements to keep X = (cumsum(Y>0, 2, 'reverse') < nelems+1) .* Y

fast 7 Jahre vor | 2

| akzeptiert

Beantwortet
Importing csv file with scientific notation
Unfortunately, none of the high-level functions work with UTF16, so you have to go low-level. Even then, you'll get a warning th...

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
Writing to Excel sheet from Excel Add-In function
Note that there's no need to go through get, you can simply your code to: xl = actxGetRunningServer('Excel.Application'); xlsh...

fast 7 Jahre vor | 0

Beantwortet
Create dataset from multiple Cell arrays
For lack of answers to my questions, here is a more efficient method than the accepted answer: allpatients = vertcat(Results{:}...

fast 7 Jahre vor | 2

| akzeptiert

Beantwortet
Excluding Constants from Consecutive numbers
[~, rows] = unique(D(:, 2), 'stable'); newD = D(rows, :)

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to parse text data
Are you still on very old version (please fill the release field next to the question)?. If on a modern version, the file can ea...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
Why fwrite is ~320x slower in the second interation and onwards when writing interleaved data?
I would suspect the reason for the much slower writes in iteration 2 and onward is that for the first iteration, since the file ...

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
Organising data from a matrix
selectedvalue = 4; filteredmatrix = yourmatrix(yourmatrix(:, 1) == selectedvalue, :)

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
how can I read a file with the format '.cine'?
If you are talking about the video format produced by VisionResearch Phantom cameras, then they can provide you with some matlab...

fast 7 Jahre vor | 0

Beantwortet
Isolating and running a piece of code separately from the rest
A complete guess, if you want to split A into groups that start when B is 0 and apply unwrap to each group: group = cumsum(B ==...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
How can I make a vector divide 1 by increasing numbers?
v = 1 ./ (1:10)

fast 7 Jahre vor | 1

| akzeptiert

Beantwortet
convert numbers that contain the scientific notation e to the long format then round it to the fourth decimal?
I assume that what you mean is that you'd like matlab to display numbers as -0.0003 instead of 3e-4. If so, format shortg will...

fast 7 Jahre vor | 0

Beantwortet
How to find array elements that meet a condition defined by an index vector?
It's not clear to me why L is a matrix of integers when the only value you care about is 5. Shouldn't it be a binary matrix? We...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
Cannot read data from a table to create a graph
The problem is that your timestamp column is text and matlab does not know how to use text as a plot variable. I assume that th...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
how to preallocate a variables
Again, with the code you show, there's nothing that can be preallocated. But your loops are also not very useful since the overw...

fast 7 Jahre vor | 0

| akzeptiert

Beantwortet
Matlab doesnt recognize file in path while using readObj
sarl = readobj(something) Pass the content of the variable called something to the function readobj. If readobj expects a filen...

fast 7 Jahre vor | 1

Beantwortet
64 bit binary number representation in matlab without rounding off
If matlab shows the number is 1.01010101010101e+41 then you do not have a binary number. You have a decimal integer number consi...

fast 7 Jahre vor | 2

| akzeptiert

Mehr laden