Answered
Summing two signals should result in zero, but doesn't
Round-off error. The calculation of cos() is not perfect. You can reduce the round-off error by using cospi() % define signal ...

2 years ago | 0

| accepted

Answered
My image is stored in struct format after loading a .mat image. How to convert it back into image form ? It load as a struct 1x1 format.
data=load(currentFile); The result of load() of a .mat file is a struct with one field for each variable loaded. data=...

2 years ago | 0

| accepted

Answered
Matrix is returning zero when the values clearly shouldn't.
%% Data Import high_S25_D2 % Importing the file high_S25_D2 = readmatrix('HighSpringRateS2.5D2.txt'); % Separating column...

2 years ago | 0

Answered
How can i make the legend as shown in the figure attached?
The trick would be to configure two columns for the legend... and configure the legend entries for the first three legends to en...

2 years ago | 0

Answered
Use of interp2 in an arbitrary dataset
x=[0.25;0.50;0.75]; y=[0.25;0.60;0.35]; Z = [0.5; 1.5; 3.0]; [Xq,Yq] = meshgrid(0:.01:1, 0:.01:1); F = scatteredInterpolant(...

2 years ago | 0

Answered
How to do bit-wise operations on symbolic variables that may be very long possibly larger than inter 64
a = sym(12345); b = sym(9867); c = sym(0); n = sym(0); while a>0 |b>0 digita=mod(a,2); digitb=mod(b,2); c=c+m...

2 years ago | 1

Answered
Hi, I have a question about buffer function and about fft function.
Buffer without overlap is easy. take the length of the signal do an integer division by the buffer length to get the number of...

2 years ago | 0

Answered
I received a message : "We are unable to offer you a trial." Why?
One of the common reasons for not being able to be offered a trial, is if you happen to be in a country for which there is a dis...

2 years ago | 0

Answered
How to open Tonatiuh output .DAT files in MATLAB?
According to https://code.google.com/archive/p/tonatiuh/ The binary format used to store the values is Real64 with big-endian ...

2 years ago | 0

| accepted

Answered
How does the matrix product block work?
The input signal is dimension 2, not 1 x 2 or 2 x 1. You need to pass it through a reshape block https://www.mathworks.com/help/...

2 years ago | 0

Answered
Issue with getframe()
The image is RGB; you cannot change the colormap on RGB images. The image has tick marks drawn into it. When you image() or ima...

2 years ago | 0

Answered
Offering Designated Computer Activation
I was asked by a User of our license, If I could unlock MATLAB (designated computer) for him The answer is No, not when you are...

2 years ago | 0

Answered
How to use a slider's value as an index to plot a dot that moves in App Designer
round(n); That has no effect, as you are not assigning the result to anything. But it is unnecessary anyhow: you u...

2 years ago | 0

| accepted

Answered
how to modify a variable data by scale function like data= scale(data); I have to modify scale function for variable data
Given only the above information: function scaled = scale(data) scaled = data ./ 1000; end The 1000 should be adjusted to...

2 years ago | 1

| accepted

Answered
How do query timestamps when reading fileDatastore
fds = fileDatastore("Raw Sensor Data\"+deviceid,"ReadFcn",@load,"FileExtensions",".mat") Instead of passing in the directory to...

2 years ago | 0

Answered
How to get curve fitting equation
You would use polyfit For a degree 8 polynomial, you would probably want to use the centering and scaling, by requesting that...

2 years ago | 0

| accepted

Answered
Error: "The input cannot be a full matrix" while using Hamming encode in simulink.
https://www.mathworks.com/help/comm/ref/hammingencoder.html This block accepts a column vector input signal of length K. The o...

2 years ago | 0

| accepted

Answered
Errors Using Pic2Points
pic2points() needs to be installed from the File Exchange; https://www.mathworks.com/matlabcentral/fileexchange/54799-convert-im...

2 years ago | 1

| accepted

Answered
Set a variable in Simulink workspace from App Designer
assignin('base', 'battery_capacity', app.BatteryCapacityEditField.Value);

2 years ago | 2

| accepted

Answered
How to project a N*N matrix on a circular shape without loosing any data?
See https://www.mathworks.com/matlabcentral/fileexchange/17933-polar-to-from-rectangular-transform-of-images?s_tid=srchtitle ...

2 years ago | 0

| accepted

Answered
Why does my Nx2 matrix turn into a 1x1 when I pass it into a MATLAB Function block
When you use From Workspace, then the first column of the data is treated as the time, and the remaining columns of the data are...

2 years ago | 0

Answered
how to write a matrix operation for subtract
M = readmatrix('depth'); files = dir('depth_*'); for K = 1 : numel(files) infile = files(K).name; outfile = regexp...

2 years ago | 0

| accepted

Answered
how to animate graph from csv file?
M = readmatrix('12012024_1.csv'); time = M(:,1); F1 = M(:,2); F2 = M(:,3); F3 = M(:,4); F4 = M(:,5); F5 = M(:,6); F6 = M(:,7);...

2 years ago | 0

| accepted

Answered
How to get optimal number of clusters in data set using fuzzy c means? Please answer this it is very important for my study.
The optimal number of clusters is equal to the number of unique points. When every unique point is the center of its own cluster...

2 years ago | 0

Answered
Discrete z to convert z^-1
z = tf('z'); Gz = 0.0004773*(z+0.9544) / ((z-0.9591)* (z-0.9064)) Gz1 = tf(Gz.Numer, Gz.Denom, Gz.Ts, 'Variable', 'z^-1')

2 years ago | 1

Answered
How can I break up a large table by one of its columns?
CityA_Table = YourTable(YourTable.('Location Name') == "City A", :); If you want to break down by location then G = findgroups...

2 years ago | 0

Answered
Unable to get the following DAE system of equations solved
ode15i passes three parameters to the given function: (t,y,y′) You are not required to do anything with the third parameter......

2 years ago | 0

Answered
Need to find rows with specific strings
mask = contains(data, 'what you are looking for'); selected_data = data(mask);

2 years ago | 0

Answered
Matlab 2017a not opening in Mac OS 14.2.1
You are correct, MATLAB R2017b is too old to open on MacOS Sonoma. If you try to open it directly, you will get a crash messag...

2 years ago | 0

Answered
does matlab version 2021a have forecast command !!!!
It looks like you named your script forecast.m and you expect that script forecast.m to be able to call the forecast() function....

2 years ago | 0

Load more