Answered
In an assignment A(I) = B, the number of elements in B and I must be the same.
x= data_train(:,i); That looks like a column of data, but we cannot tell how large it is v1 = wh*x; %data entered If wh is a ...

4 years ago | 0

Answered
how to take mean of three dimension data at seasonal scale?
Same basic way, mam = reshape([3:12:120; 4:12:120; 5:12:120], 1, []); MAM = data(:,:,mam); MAM3 = reshape(MAM, size(data,1), ...

4 years ago | 2

| accepted

Answered
Use Matlab with not supported Py3.x version (e.g. ML 2021a with Py 3.9)?
Yes, of course there is a possibility. Python is open source code. You can get a copy of the 3.9 code and alter the numbering a...

4 years ago | 0

Answered
Convert txt files in csv/xlsx files
dinfo = dir('*.txt'); filenames = {dinfo.name}; nfiles = length(filenames); for K = 1 : nfiles thisfile = filenames{K}...

4 years ago | 1

| accepted

Answered
How to change index value of logical array.
locs = find(Mask); first = locs(1); last = locs(end); With regards to changing the index: what do you want to do if t...

4 years ago | 0

| accepted

Answered
how to generate synthetic data using probability?
randn() * standard_deviation + mean The result is seldom realistic trajectories, as real trajectories have more continuity. U...

4 years ago | 0

Answered
keep few images and delete the rest in a folder
dels = setdiff(1:length(all_files), b); arrayfun(@(idx)delete(all_files{idx}), dels);

4 years ago | 1

| accepted

Answered
I cann't insert calculated variable (make it to properties var)into ther row with colum name "Result"
app.up.Result(1) = app.ptu1; app.up.Result(2) = app.path; For those assignments to work, each of the...

4 years ago | 0

Answered
how to remove conj from equations? AND SOLVE THEM ?
At some point in your code, you construct a row vector of equations, and then you use the ' operator thinking that it will trans...

4 years ago | 1

| accepted

Answered
Confusion between real-world and floating-point values
You forgot to take into account that an integer data type operated on with a double precision number, returns the integer data t...

4 years ago | 0

| accepted

Answered
Legend inside for loop
for i=1:10 figure() subplot(2,2,i) H(3*i-2) = plot(x, y, 'displayname', i + "A"); hold on H(3*i-1) = pl...

4 years ago | 0

Answered
Extract value from every struct
vois={'ldF', 'rdF', 'lvF', 'rvF'}; numvois = length(vois); basedir = 'place/where/the/folders/are'; foldinfo = dir(basename...

4 years ago | 0

| accepted

Answered
Scaling one dataset to fit another dataset
It is not clear what is being scaled, or how x y v t fit in here other than the condition for v. But suppose you break the da...

4 years ago | 0

| accepted

Answered
How to save character matrix into NetCdf files?
The default data type is double. You need the "datatype" option. Please recheck what x and y mean to you. You are using x as ...

4 years ago | 1

| accepted

Answered
"Undefined function or variable 'PA'. The first assignment to a local variable determines its class.". Why do I keep getting this error?
double(PA); double(IA); D=Dprev; PA=VA*IA; You do something (useless) with PA before you assign to it. Remember in MA...

4 years ago | 0

Answered
Copying directory structure without files
You only have to mkdir the leaf directories: mkdir will create any intermediate directory needed. You can use dir() with the...

4 years ago | 1

| accepted

Answered
adding counter as a number of runs performed
You can use persistent variables. Generating the *name* of a variable on the fly is not recommended.

4 years ago | 0

| accepted

Answered
why the program is not running .
k=4:0.2:5; D1=solve(D==0,c); Consider the following code: A = 1 B = 10*A A = 2 What is the value of B ...

4 years ago | 0

| accepted

Answered
How should sensor nodes be arranged in the grid?
Penrose tiling.

4 years ago | 0

Answered
Do matlab has build-in mnist dataset for CNN training? If I load it as dlarray, how do I train it with CNN?
No it does not. The download link is given at https://www.mathworks.com/help/deeplearning/ug/data-sets-for-deep-learning.html

4 years ago | 0

| accepted

Answered
Why the Accuracy is changing for same data set while using Classification learner app in MATLAB.How do I get the Accuracy same for all the time
Before every run, use rng() to set the random number seed to a consistent value. Most training systems for classifiers and ne...

4 years ago | 0

Answered
How can we couple MATLAB and Aspen Exchanger Design and Rating?
https://www.researchgate.net/publication/332736398_Aspen_Plus_and_MATLAB_linking_methods shows the ID for Aspen Plus. I do not k...

4 years ago | 0

Answered
set Anonymous function through a series of matrix for "lsqcurvefit" or "lsqnonlin"
k = 1:10; row vector of length 10 F = @(x,k) [2, 2, exp(k*x(1)), exp(k*x(2))] * [1; k; -1; -1] % same as above equati...

4 years ago | 0

Answered
Program code for convolution
nlfilter() a function that converts to double, does element-wise multiplication, and sums.

4 years ago | 0

Answered
How to solve symbolic and trigonometric equations simultaneous, two unknowns
d == atand((tanh(2*alpha*tan(gamma)+1)+tan(gamma))/(tan(gamma)-tanh(gamma)+2*alpha)) take tand() of both sides of that, get...

4 years ago | 0

| accepted

Answered
Reading a set of numeric values from 100s of .txt files inside a folder
foldername = 'SimResults'; dinfo = dir( fullfile(foldername, '*.txt')); filenames = {dinfo.name}; nfiles = length(filenames);...

4 years ago | 0

| accepted

Answered
Get the filename of a loaded file
filename = '\Data_record_file_20220714T121615.mat'; load(filename); [~, basename, ~] = fileparts(filename); title( "Analy...

4 years ago | 1

Answered
Converting binary to image file
The contents of the file are already characters. You do not need to +'0': you only +'0' if the content is numeric 0 and 1 rather...

4 years ago | 0

Answered
Is it possible to loop through and set image pixels with a parfor loop?
transformedImage(row, col, :) = app.newImage(rowNew, colNew, :); % THIS WONT WORK W/ A PARFOR LOOP Change that to...

4 years ago | 1

| accepted

Answered
my program is not stop. please help
tic syms c h k c11=106.8; c33=54.57; c13=9.68; c15=0.28; c35=-1.69; c55=25.05; r1=2727; l=2.46; u=5.66; r2=7800; i...

4 years ago | 0

| accepted

Load more