Respondida
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...

más de 4 años hace | 0

Respondida
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 ...

más de 4 años hace | 0

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 1

| aceptada

Respondida
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...

más de 4 años hace | 0

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

más de 4 años hace | 1

| aceptada

Respondida
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...

más de 4 años hace | 0

Respondida
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.

más de 4 años hace | 0

| aceptada

Respondida
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.

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

Respondida
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 ...

más de 4 años hace | 1

| aceptada

Respondida
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.

más de 4 años hace | 1

Respondida
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...

más de 4 años hace | 0

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

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 1

| aceptada

Respondida
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)...

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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 ...

más de 4 años hace | 0

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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 # ’...

más de 4 años hace | 0

| aceptada

Respondida
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.

más de 4 años hace | 0

Respondida
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 ...

más de 4 años hace | 1

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

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

| aceptada

Respondida
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...

más de 4 años hace | 0

Respondida
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;

más de 4 años hace | 0

Respondida
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'} ...

más de 4 años hace | 0

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

más de 4 años hace | 0

Respondida
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;

más de 4 años hace | 0

Cargar más