Solved


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

3 years ago

Solved


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...

3 years ago

Solved


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

3 years ago

Answered
Storing results from for-loop
idx = []; for i = 1:length(grfcutl) a = grfcutl{i}; idx(end+1) = find(a<=0,1,'first') end

3 years ago | 0

| accepted

Answered
How can I insert a detail in the peak of the curve ?
use function axes for zommed peak. you can define those Position and Limits. and annotation('arrow') for arrow.

3 years ago | 0

Answered
How to read text file with float and string types into matrix
%% Import data from text file % Script for importing data from the following text file: % % Auto-generated by MATLAB on 26-Au...

3 years ago | 0

Answered
How to open .mpr data?
It's associated to a data file format of Visual FoxPro

3 years ago | 0

| accepted

Answered
Curve fitting with a constrained y value to Zero
clear;close;clc x = [4.4 21.1 37.8 54.4 ]; y = [2.367224698 0 -1.857318083 -3.276015126]; w = [1 1000 1 1]; [xData...

3 years ago | 1

Answered
Code for 'Reverse a Vector'
I had no this error with v = [ -75 -22 57 13 -34 2 -94 -49 -11] You can also use w = flip(v) It is same..

3 years ago | 1

Answered
How to display cfit data on plot
coeffs = coeffnames(fitresults); coeffvals= coeffvalues(fitresults); ci = confint(fitresults,0.95); str1 = sprintf('\n %s = %...

3 years ago | 0

Solved


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

3 years ago

Answered
How to choose data with three conditions to plot contour
x(x<0 & x>-25) = 0;

3 years ago | 1

| accepted

Answered
plot the month and year in X-axis
clear;clc;close all tab = xlsread('data_final'); Date = datetime(tab(:,1),tab(:,2),1); data = tab(:,3); [Date,I] = unique(...

3 years ago | 0

| accepted

Answered
peak finding of a graph
x=V1_1_new; y=y1_1_new; [pks, locs] = findpeaks(y); plot(x,y,x(locs),pks,'o')

3 years ago | 0

Answered
Taking values from a Matrix and Inputting into an equation, using Loops
A = [1 2 3 4 5 6 7]; for i = 1:length(A) x = A(i); y(i) = x^2; end y

3 years ago | 0

| accepted

Answered
how add Month label in x axis
clear; close all; clc month = {'apr19', 'may19', 'june19', 'july19', 'aug19', 'sept19', 'oct19', 'nov19', 'dec19', 'jan20', 'fe...

3 years ago | 0

| accepted

Answered
How to find the limit of a transfer function defined using tf?
sys1=tf([20 20],poly([-4 -3])); [Num,Den] = tfdata(sys1,'v'); syms s sys_syms=poly2sym(Num,s)/poly2sym(Den,s); lim = limit(s...

3 years ago | 1

| accepted

Answered
How to make a gif or video file from multiple *.dat* files using Matlab?
use getframe and writeVideo in for-loop

3 years ago | 0

Answered
Taking too long to get the output (Wilson theta method)
Without loops it runs faster. Please check it carefully clc;close all;clear; MA = [8070000,0,-629468070;0,8070000,112980;-6294...

3 years ago | 0

| accepted

Answered
How to plot multiple fitted curves in single plot with different colors and legends
You can predefine your colors for example as colors = {'r','g','b'}; % or colors = colormap(jet(3)); % etc. and than in lo...

3 years ago | 0

Answered
How can I insert two quadratic trendlines for two datatsets (one each) on the same figure?
clc; close all; clear; x = [0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0]; % x plot y1 = [1660.383 1665.397 1671.268 1678.238 1...

3 years ago | 0

| accepted

Solved


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

4 years ago

Solved


Get the area of ​​the square.
Four circles are inscribed in the square ABCD. The perimeter of each circle is *aπ*. <<http://imgfz.com/i/UzgCJut.png>> Gi...

4 years ago

Solved


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

4 years ago

Solved


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

4 years ago

Solved


Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

4 years ago

Solved


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

4 years ago

Solved


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

4 years ago

Solved


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

4 years ago

Solved


Plot Damped Sinusoid
Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

4 years ago

Load more