People who code: we want your input. Take the Survey

# Questions tagged [matlab]

MATLAB is a high-level language and interactive programming environment for numerical computation and visualization developed by MathWorks. Don’t use both the [matlab] and [octave] tags, unless the question is explicitly about the similarities or differences between the two. When using this tag, please mention the MATLAB release you're working with (e.g. R2017a).

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
237 views

### Does CART algorithm takes into account in the order of the set of attributes?

when using matlab command 'fitctree' for classification purpose, and I change the order of the attributes I do not find the same Tree and thus the same classificaiton error? why? CART algorithm does ...
209 views

### Using LSTM to forecast vehicle position - multivariate time series - Matlab

I am trying to train an LSTM model on Matlab to forecast the position of a vehicle when driving around a roundabout. My main concern right now is that my dataset consists of 4 features (X position, Y ...
61 views

### Finding roots of a non linear expression when multiplied with a linear expression

Here is a simple polynomial equation: b^2 + 2b + 1 = 0 I could easily solve this as: ...
983 views

### How to implement Moving window with LSTM for Time Series Prediction?

I am trying to implement a moving window in my dataset. The window size=14 (for instance).After implemntinf sliding window how to prepare inputs and outputs for netwok? ...
413 views

### Matlab: setting static iterations per epoch in a CNN

I'm building a convolutional neural network using Matlab's neural network toolbox. I have code designed to cross-train the network with different data sets, using the previous network's layers in ...
136 views

### hmmtrain in Matlab converging to different values of trans and est over different runs

As the title indicates, over multiple runs of my program, I get different values of trans and est. Are these local minimum? If so how do I get the optimal one? NOTE - They all have the same starting ...
138 views

### Parameters for CART tree

I'm using fitctree function from Matlab to fit a CART tree to my dataset (10'000 data points, 20 features). First, how can I exactly prune it and to what level should the tree be pruned? I think I ...
23 views

### Backpropagation on a CNN

I have tried searching for this, but it seems like no one addresses a key aspect of this problem (or maybe I'm overthinking this): So, first let's assume we have a 3x3 image with a single channel, and ...
24 views

### Pixel labelled image is must for semantic segmentation using deep learning in matlab?

I have large set of CT images containing lung regions. But I don't have corrosponding pixel labelled images. So how I could do semantic segmentation using DL in matlab. Like a test program I created 6 ...
19 views

### Matlab Optimization. Meaning of warning: “The slope should be 2. It appears to be 1.”

I'm using the manopt package to solve some optimization problems in matlab. The problem is of the form. problem.cost = @(x) f(x) problem.egrad = @(x) g(x) After the problem definition, I check ...
74 views

I have manually created a random data set around some mean value and I have tried to use gradient descent linear regression to predict this simple mean value. I have done exactly like in the manual ...
17 views

### Optimization problem with different type of constraints

I'm new to optimization problems. I want to find optimum values for my objective function. You can imagine my function as E = f(t1, t2, t3). I want to minimize <...
7 views

### I want to use a neural network for a control block in MATLAB, but without Simulink

I have a physical model that produces an error value after running, which I want to minimize by a Neural Network. I can not find a MATLAB function however that lets me run the program and use the RMSE ...
18 views

### Embedding git commit into the resulting data

Our pipeline works something like that: Collect bunch of raw data (10-100 GB) from microscope Process data using MATLAB scripts Change few parameters based on raw data, as well as add new features to ...
557 views

### Tensorflow simple neural network has very bad performance in regression (curve fitting) problem

I'm trying to implement a very simple one layered MLP for a toy regression problem with one variable (dimension = 1) and one target (dimension = 1). It's a simple curve fitting problem with zero noise....
74 views

### Where can I find an algorithm for human activity classification using thigh and shank sensors?

I am working on a project where I initially need to classify the type of activity a subject is performing based on raw accelerometer and gyroscope data from the thigh and shank of both legs. The type ...
412 views

### SVM hard and soft margins in matlab,

I am comparing the performances of several SVM models in matlab using the fitcsvm function, and I want to double check that I am using the correct syntax for hard ...
310 views

### Plotting ROC curve in cross validation using Matlab perfcurve

I have the following code for a binary classifying using SVM, and 10 cross-validation, ...
174 views

### How to create a timeline graph ( Date / time series) in MATLAB?

The data file is attached https://ufile.io/ttwi8.How may I create a timeline graph where my y-axis is the number of cases(Demand and prediction as sjown in attached graph) and my x axis is increasing ...
573 views

### convert 16-Bit to 8-Bit images

I am using matlab, and I need to convert 16-bit images to 8-bit images (tif extention) , and I used image = im2uint8(16bit_img); image = uint8(16bit_img/256); ...
87 views

### How can I combine images for Matlab deep learning?

I have a data set which consist a number of instances (of two-three different classes), and for each instance I have a handful of monochrome images. This handful of images have different resolutions (...
421 views

### How to identify ARIMA model parameters

I am trying to build ARIMA model, I have 144 terms in my standardized time series, which represent residuals form original time series. This residuals, on which I would like to build ARIMA model, are ...
563 views

### Why is my classification tree is showing only one node, and how to resolve this issue?

I also asked here: https://stats.stackexchange.com/questions/287587/reason-of-getting-only-one-node-while-implementing-classification-tree-in-matlab Hello, I have $N=1520=19*80$ samples, each of ...
28 views

### Applying deconv for a large dataset

For my program on BCH decoding I had to polynomially divide the corrected BCH code with the generator matrix for the final decoded input. I did the same as follows: ...
157 views

### Chance Curve in Accuracy-vs-Rank Plots in matlab

I'm working on an image classification problem where each test image (query image) is compared with a set of candidate images (of which several images are considered as "correct answers" or "relevant")...
88 views

### $\chi^{2}$ kernel SVM performance issue

I am using $\chi^{2}$ kernel for non-linear SVM (using libSVM) for classifying MNIST digits. I am getting very bad performance (worse than random guessing). The $\chi^{2}$ kernel code (in MATLAB) is ...
17 views

### Siamese Network with Triplet Loss function using the Matlab's Deep Network Designer

How can I design a Siamese Network with Triplet Loss function using the Matlab's Deep Network Designer? I was not able to achieve this.
12 views

### Reducing features to 2 by PCA confusion Matlab

I am trying to reduce $500$ features to $2$ as an assignment. I wrote the following code and I am deeply concerned if it is true as when I plot it on the graph it does not look good. It should look ...
12 views

### Performing 1D Depthwise conv using Keras 2D Depthwise conv

I would like to perform a 1D Depthwise convolution (ie the first step of the depthwise-separable convolution) for a machine learning model I am working on. This means that for an input activation ...
16 views

### differences in NN optimization algorithm between Matlab and Scikit-Learn

I'm trying to build a neural network to estimate the responses of a nonlinear system. My database contains 1000 load cases (inputs) and maximum responses (outputs) from numeric simulations. I'm using ...
16 views

### Algorithm for clustering worm-like points in a cloud

I have a cloud of points were I can clearly identify worm-like patterns in the cloud, along the Z-axis but embedded in the noise. My goal is to cluster the points that belong to the same "worm'. ...
17 views

### Problem in working out an example of SVM: mathematical steps

I am trying to code SVM from scratch using a small toy problem that involves five support vector values. In the code below, there are 5 support vectors arbitrary chosen and denoted by the variables <...
13 views

### K-means related question

I am a new user to Matlab kmeans and have the following question: I would like to use the following call from a Python application which is listed in this URL. ...
38 views

### Method of hyperparameter tuning for regression tree ensembles in Matlab

What regression tree ensemble methods and what parameters does Matlab actually consider in hyperparameter tuning? The documentation appears to be sparse, to say the least. See https://se.mathworks.com/...
28 views

### Results of quadratic SVM in Matlab are different from the results obtained in Python

I am trying to replicate a quadratic SVM classifier from Matlab to Python, however I am having different results regarding the accuracy. In Matlab the accuracy is 0.8955 meanwhile in Python the ...
40 views

### Looking for a machine learning algorithm that can classify line plots into two groups?

I have a dataset of many 2-D line plots that represent height versus position measured from an AFM. I am interested in training a model by classifying these lines into two groups: presence of a defect ...
32 views

### How do I apply radon and iradon function in a 3D image

I am using matlab image processing , I have a 3DBodyphantom image of a CT scan which displays the axial,coronal and saggital slices, I am to apply to the image the radon function to get a sinogram and ...
19 views

### Optimization function returns the same optimal parameters for two labels

I've recently enrolled in the Coursera machine learning, and am working my way through making my own classifier for the Iris dataset problem using matlab. I'm training a classifier for each species (...
26 views

### looking for a correlation function for categorical + numerical datasets in matlab

I am looking for a function in Matlab that calculates the correlation coefficient of a data set that includes categorical + numerical data. I am quite surprised this isn't as straightforward as I ...
32 views

### Why do the training curve fall sharp suddenly?

I am training a CNN classifier on a binary balanced dataset. The dataset has 4500 numbers of tweet data along with the class of the tweet. During training, I am applying, GLOVE embedding of 300 ...
76 views

### How to implement loss function for CNN-SVM implementation

I am using Matlab R2018b and am trying to infuse svm classifier within CNN. My plan is to use CNN only as a feature extractor and use SVM as the classifier. I know people have already implemented it a ...
21 views

### Error using imread function in matlab code

I was doing some sort of speech recognition pattern for recognition of sound but I stuck at imread error in matlab, any advice what to change in picture below you can find code and error. Code Error ...
52 views

### What's the correct form of use the real coded genetic algorithm?

I'm new to genetic algorithms, but I haven't found specific info about real-coded GA's. I want to do antenna array optimization by using the real values of antenna position, phase, and amplitude, but ...
165 views

### How to find the average over an area of center for a given radius

folks, I have an excel file which contains the lat and long values of the center of a Tropical Cyclone(TC). The excel file is as given below: Also, I have an NC(NetCDF) file which is of that of ...
I am having a problem in Matlab. I would like to use kmeans clustering and then get the value and index of the centroid. For example, if there is an $5*5$ array, we do kmeans clustering where k=2 and ...