Beantwortet
How to apply uitable to compute and display values those two purposes at the same time?
Sorry didn't quite get your problem. are you trying to update the uitable as program is runing? If it involves a loop in your c...

mehr als 4 Jahre vor | 0

Beantwortet
How do I save values in my loop as a column vector?
You can use h1(:) instead to make hi1 explicitely a column vector. This has a potential risk too if you h1 is actually a matrix ...

mehr als 4 Jahre vor | 0

Beantwortet
hello, I am receiving an error . It says Undefined function or variable 'grayImage'. please let me know how i can define the function . here is my code
you have to have image data first which the grayImage is supposed to be. you can use imread to read an image in your disk for ex...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Assigning colours to a group of columns when using plot
Dot indexing doesn't support this. You can use set(p(1:10), 'Color', 'red'); instead. A further note is that when you use dot i...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How can I label images with numbers for the purposes of machine learning?
One solution is to save images with the same number of mms in one folder and name that folder with the number of mms. You can lo...

mehr als 4 Jahre vor | 0

Beantwortet
Fullfile function gives me a false reading with the slash symbol
fileToRead = fullfile('C:\Users\thomas\Files\', [CCC '.csv']);

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
i need a example code for Single-level discrete 2-D wavelet transform
Say x is your signal and you’d like to do an n-level decomposition, using [C, L] = wavedec(x, n, ‘db2’); db2 is the wavele...

mehr als 4 Jahre vor | 0

Beantwortet
How can I properly index a table using isnan? (R2020a)
Either use dot notion or {} pair to access a table element. Try R.Var1(1) for example.

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to show word from excel?
subT = T(T.NO == 1, [2 5 6]); Will be the first record with the 2nd 5th and 6th variable as a new table.

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Trying to put values from one array into another
A(:) ./ size(A, 1) * ones(1, size(A, 1)); If I understand what you said correctly, the above script will give you what you ne...

mehr als 4 Jahre vor | 0

Beantwortet
Copyfile/ movefile when filenames are not directly available
flagged is a cell so you couldn’t access it using parentheses and dot motion. flagged{i} is your ith element in flagged. For ...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to add the value of the 3 highest elements automatically from a vector?
[~, ind] = sort(y); y(ind(end-2, end)) = y(ind(ind-2, end)) + ax; Should meet your need.

mehr als 4 Jahre vor | 1

Beantwortet
Substract Each Element in A Matrix MAT1 from all the elements of another Matrix MAT2
What MATLAB version are you using? Newer versions actually support operations between e.g. a vector and a 2-d matrix if they ha...

mehr als 4 Jahre vor | 0

Beantwortet
Extracting values that are greater than the threshold
outAlert = Alert(Alert(:, 3) > 21, :); should be what you want to have

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Monthly data to seasonal using sum (how to use splitapply)
Try below tbl = CELL{1}; tbl.month = month(tbl.dates); tbl.season = floor(tbl.month ./ 3); tbl.season(tbl.season == 4) = 0...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
FFT of a time-valued signal, then IFFT doesn't return the same signal
fs=200000; time=0:1/fs:2-1/fs; data=load(['S09H4R2.dat']); Ffrapp=2*fft(data(:,1))./length(data(:,1)); Fsarf=2*fft(data(:,2)...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can i create an array with datetime values as one column and integers as one column?
you can use table instead of an array. table can have columns with different types. e.g., a = yourDatetime; b = yourInteger...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Plot implicit function with the summation inside
z1 = @(w_c, mu) 1 + w_c / pi ... * sum((-1).^n / n .* 2 * pi^2 * n .* t ... % are you sure that the first / and the second ...

mehr als 4 Jahre vor | 0

Beantwortet
How do I perform a channel with probability?
% simulate a sequence r r = [ones(100, 1); zeros(100, 1)]; ind = randperm(length(r)); r = r(ind); % randsrc generate a...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
how to center a string
function out = padline(c, n) if n > length(c) n2add = floor((n - c) / 2); out = [repmat(‘ ‘, 1, n2add) c repmat(‘ ‘, 1, n - leng...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How do I set legend labels depending on number of plotted data?
So using your style legendStr = []; for iL = 1:numberOfObj legendStr = [legendStr; string(inputdlg([‘what is the legend # ’...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Error: Line 91 Column: 44 When calling a function or indexing a variable , use parentheses. Otherwise, check for mismatched delimiters
Matlab uses comma not ; Parameter names are without spaces. And you have an extra ) that doesn’t have a ( to match it.

mehr als 4 Jahre vor | 0

Beantwortet
How to add values into a vector with for loop in a function
It looks that in your function test1, the second parameter SOC_a is supposed to be a vector. While in your main function, when ...

mehr als 4 Jahre vor | 1

Beantwortet
Error using legend MATLAB R2019b
what is your signalLabels? Is that a cell or a string matrix?

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Legend in plot using forloop
Not quite sure what you meant by "the legend stays wrong", but please try this if my guess is correct. figure(1) ee = linspace...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Creating a matlab function that reads the raw input data, given in the text file.
Is the text file contains data with fixed columns and rows? If yes, you can try using readtable. If there is a headline in the t...

mehr als 4 Jahre vor | 0

Beantwortet
How to store a string of n elements as one element of a matrix
You may want to try a cell array instead? N{i, j} = Nff;

mehr als 4 Jahre vor | 0

Beantwortet
strtok is only using the first character of my delimiter instead of the full character vector
why don't you use strsplit instead? >> a = strsplit('Hello World', 'HAIR') a = 1×1 cell array {'Hello World'} ...

mehr als 4 Jahre vor | 0

Beantwortet
Plotting a graph with multiple constraints
x >= 2 & x <= 5 this express will consider both constraints in. Is this what you need?

mehr als 4 Jahre vor | 0

Beantwortet
Function that squares each elemnt of a matrix
If you only want to square each element of a matrix, you use .^ For example: A = randn(100, 100); B = A.^2;

mehr als 4 Jahre vor | 0

Mehr laden