Answered
Contourf and colormap limits
The problem is your data goes from [-6.5 8]. The 16 contour lines have been drawn for that. Then when you call caxis, you get ri...

3 months ago | 0

| accepted

Answered
how to load .mat file into gui with edit box
The file name isn't important since you capture that in a variable. What is the name of the variable in your mat file? When you...

3 months ago | 0

| accepted

Answered
3D matlab plot
I can confirm that MATLAB is plotting the values recorded in the GPS file. How are the GPS values obtained? In what units?

3 months ago | 0

Answered
I am getting an error in GUI.Someone please help me out
Your pushbutton3 callback has a comment that is missing the '%' at the beginning. ... handles.LH3=LH3; handles.HL3=HL3; ...

3 months ago | 0

| accepted

Answered
How to change the StepTolerance in fslove
See the documention for fsolve options. You can use optimoptions. options = optimoptions(@fsolve,'StepTolerance',1e-10) You ...

3 months ago | 0

Answered
How can I add a a best fit line, a scatter plot data? having trouble
I'd use polyfit. This example shows you to do a simple linear regression. x = 1:50; y = -0.3*x + 2*randn(1,50); p = polyfi...

3 months ago | 0

Answered
two conditions for plotting
I'm not exactly sure what you are trying to do, but you are being very careless with your indeces. For starters: A is a 4x3 mat...

3 months ago | 1

| accepted

Answered
Matrix dimensions must agree
What version of MATLAB are you using? If pre 16b, the issue might be the 3rd dimension. k= rgb2gray(anhGoc2); makes k a 512x51...

3 months ago | 1

Answered
How to find the coordinates ( x-axis and y-axis) of the white square
Just the x and y coordinate of every white pixel? img=imread('image.jpeg'); imshow(img) [m,n] = find(img==255); If you want ...

3 months ago | 0

Answered
How to interpolate an ellipse given data points?
The challenge is to get your x to be unique and increasing. If I create a new variable that is the cumulative distance of each p...

3 months ago | 0

| accepted

Answered
Websave on csv returns empty file
I have an idea. When I go to the url specified in the websave command (http://stooq.com/q/d/l/?s=^aor&d1=20190303&d2=20190405&i=...

3 months ago | 0

Answered
how to find the Matlab function definition
I'm afraid there is not any information to be had. >> which SVPWM3L_TimingCalculation C:\Program Files\MATLAB\R2018b\toolbox\p...

3 months ago | 0

Answered
Fit data to an exponential curve using fitdist
If you have an idea of what your fit equation is, use fittype and fit (curve fitting toolbox). ft = fittype('a.*(1-r).^x',... ...

3 months ago | 0

| accepted

Answered
How to use fread to read little endian data?
I would seek first (outside the while loop). Depending on your data, fgetl may not make sense (files read by bytes don't have e...

3 months ago | 1

| accepted

Answered
Making the color, for each function that is plotted with a loop, correspond to the color bar .
There are a couple things to be careful of. First, there is no connection between the colorbar and line series color. The colorb...

3 months ago | 1

| accepted

Answered
Quiver Plot from matrices
What do you mean by not wanting to give quiver the values it needs? Not sure how you would create the plot without doing that. H...

3 months ago | 0

| accepted

Answered
Converting a stl file to 3D image with coordinates
You don't need to use stltools (nothing against it). Use the built-in stlread and trimesh. See this post for more. data = stlre...

3 months ago | 0

Answered
[F,V,N] coordinates to a 3D model
The easiest way is to use stlread and trimesh data = stlread('model.stl'); trimesh(data,'FaceColor','none','EdgeColor','k'); ...

3 months ago | 0

| accepted

Answered
How can I change the colors in an RGB image to certain colors in MATLAB
A color image has 3 color values: r, g and b. I'd first convert the image to grayscale, and then impose a threshold doing someth...

3 months ago | 0

| accepted

Answered
creating a .mat file
Load the images into variable(s) in MATLAB. Save the variables to a mat file.

3 months ago | 0

| accepted

Answered
Can contourplot plot based on the peaks of the function?
I suspect there is an error in your code. Here's a simple example using the peaks funciton in MATLAB [x,y,z] = peaks(100); sur...

3 months ago | 0

| accepted

Answered
how to load .mat file into gui with edit box
You can accomplish this withough having to use global variables. What is typically done is the variable is added to the handles ...

3 months ago | 0

Answered
Error using matlab.graphics.chart.primitive.Line/set Invalid or deleted object.
First, your function name and file name should be the same. I'd update funciton declaration to be AD_Crane(t,x) %Function saved...

3 months ago | 0

Answered
how to remove Error using contour (line 48) Z must be at least a 2x2 matrix to plot contour lines
The error is that the third input to countour (Z) must be a matrix. This doc link describes what the inputs to contour must be. ...

3 months ago | 0

Answered
Error loading MATLAB Online
You could try looking into MATLAB Drive, the file system for MATLAB Online. You can look at the Deleted Files section for an aut...

3 months ago | 1

| accepted

Answered
If/ElseIf Statement Inequality Not Resolving Correctly
If statements only work on one value at a time. You can't have it check the entire vector all at the same time. You can put the ...

3 months ago | 1

| accepted

Answered
Error using sendmail (line 175)
I've had success using the instructions provided here. No file exchange needed. You do have to allow less secure apps access to...

3 months ago | 0

Answered
Display the output in a Edit Field Text box in App-Designer
Text fields only works for h and p. load examgrades x = grades(:,1); y = grades(:,2); [h,p,ci,stats] = ttest2(x,y); app....

3 months ago | 0

| accepted

Answered
Convert datenum to datetime for multiple holded plots
It depends on your datenum source, but something like this should work. t = datetime(731885.75,'ConvertFrom','datenum') t = ...

3 months ago | 0

Answered
how to read an imagecaptured by webcam
I think the issue here is that img is not a file, but a matrix of pixel values already. You therefore don't need to use imread t...

3 months ago | 0

Load more