Solved


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

2 years ago

Solved


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

2 years ago

Solved


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the second...

2 years ago

Answered
Problem evaluating very small numbers
% Assuming you have some values for p_A, p_B, and N p_A = 0.96; % Just an example value p_B = 1 - p_A; N = 100; % Example s...

2 years ago | 0

Solved


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

2 years ago

Answered
newton raphson methon and symbolic functions
% Define the radius of the tank and the desired volume R = 3; v_desired = 30; % Initial guess for h ...

2 years ago | 0

Answered
annotation with both "doublearrow" and "textblock", with same data units
Same solution as pointed by @Voss [credit and special thanks goes to him] , I Just created some functions for easier access and ...

2 years ago | 1

| accepted

Answered
annotation with both "doublearrow" and "textblock", with same data units
% Example usage hf = figure; x = 0:0.1:200; f = @(x) 0.09*exp(-x/18); plot(x, f(x)); ax = gca; % Define the y values...

2 years ago | 1

Answered
annotation with both "doublearrow" and "textblock", with same data units
Each function will take care of positioning based on the given x values and will place the textbox above the double arrow. You...

2 years ago | 1

Answered
Correct the code for me please
In this code snippet: The divided difference table d is correctly initialized to be n by n. The array2table function is used t...

2 years ago | 0

Answered
Trouble maintaining number format when converted to report
@Floyd Try this and let me know. Thank you. % Sample data - replace this with actual data data = [0.01 0.888 1.0 40.151 39.124...

2 years ago | 0

Answered
how to automatically controls the location of the datacursor in a graph with seprated code?
To determine if a point is a crossing point on a graph, you would typically compare the coordinates of the point with the coor...

2 years ago | 1

Answered
How can I loop this ?
@Anas In this revised script: We create a cell array of stations for each parameter. We use a nested loop to iterate through e...

2 years ago | 1

| accepted

Answered
How can I loop this ?
To accommodate this in your loop, you can set up a selection mechanism that chooses the non-empty station for each parameter. He...

2 years ago | 1

Answered
Rename Data File to Folder Name and Extract The Data into Another Folder
Here is a conceptual outline of how this could be accomplished with MATLAB code: List all subfolders within the main folder. F...

2 years ago | 0

Answered
estimating oscillation frequency of a signal
To estimate the frequency of a signal that is not perfectly harmonic (polluted with noise or other frequencies), you can use sev...

2 years ago | 1

| accepted

Answered
how can I divide a vector in imaginary and real part ?
% Original complex vector X = [-8, -6, -5+8i, -3, -6+6i, -2]; % Real part of the vector X_real = real(X); % Imaginary ...

2 years ago | 0

Answered
Trouble maintaining number format when converted to report
% Sample data - replace this with actual data data = [0.01 0.888 1.0 40.151 39.1244; 0.02 0.444 2.0 35.123 34.5678]...

2 years ago | 0

Answered
Creating a "clock" plot, like polarplot.
WT = [ 1 2 3 5 42 43 59.5 0.5]; theta = deg2rad(WT*6); edges = deg2rad(-0.5:1:60.5); figure; pax = polaraxes; polar...

2 years ago | 1

| accepted

Answered
side by side boxplots
Side-by-side boxplots can be created by manipulating the positions of the boxplots manually or by using the grouping variable fu...

2 years ago | 0

Solved


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

2 years ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

2 years ago

Solved


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

2 years ago

Solved


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

2 years ago

Solved


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. http://en.wikipedia.org/wiki/Whole_numb...

2 years ago

Solved


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

2 years ago

Solved


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

2 years ago

Solved


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

2 years ago

Solved


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

2 years ago

Answered
How to find the slope of a linear area
The slope of a line on a graph represents the rate of change of the y-variable with respect to the x-variable. For linear rela...

2 years ago | 1

Load more