Risposto
transparency line of polar graph
theta = deg2rad(0:360); r = cos(theta).^2; a = polar(theta, r); a.Color =[1,0,0, .2]; % use the last value to control the tra...

oltre 2 anni fa | 1

| accettato

Risposto
how can i combine two graph which is linear and semilogy into one graph by using legend,the input is same for the linear and log graph
x = (1:10); y1 = rand(10,1); y2 = 10.^(3*randn(10,1)); yyaxis left plot(x, y1, 'ro-') yyaxis right semilogy(x, y2, 'b*-')

oltre 2 anni fa | 0

| accettato

Risposto
How can i show only definite data values in bar plot?
X=1:7; Y=[100 50 35 20 8 7 6]; idx = 1:3; % select data to plot bar(X(idx), Y(idx)); text(X(idx),Y(idx),num2str(Y(idx)'...

oltre 2 anni fa | 0

| accettato

Risposto
How to draw a sidebar in polar plotting?
theta =0:(pi/180): (2*pi); r = cos(theta) ax=subplot(221); polar(theta, r); pos = ax.Position pos(1) = pos(1)-0.05; % adj...

oltre 2 anni fa | 1

| accettato

Risposto
Superscript and subscript in ANN formula
There is a commonly used convention. The subscript is reserved to indicate the elements of array and superscript to represent th...

oltre 2 anni fa | 1

| accettato

Risposto
Error in comparing equality of two matrices
Use "isequal" for matrix comparison and "&&" for logic and. % if int64(mod_X)==int64(mod_Y)==int64(mod_Z) if isequal(int64(mod...

oltre 2 anni fa | 0

Risposto
in GUI how can I make a text box to be multiline?
Use "uitextarea". The Value properties is cell array of strings so you can obtain the multiline text from ui.

oltre 2 anni fa | 0

Risposto
Plotting Two Consecutive Columns of Matrices
x = rand(202, 4); % 202x4 (not 4x202) plot(x(:,1), x(:, 2), 'ro', x(:,3), x(:, 4), 'b*')

oltre 2 anni fa | 0

Risposto
Inconsistency in behavior of SVD
F = zeros(1000,1800); F(:,1:600) = 37; F(:,601:1200) = 255; F(:,1201:end) = 102; %A tricolor flag, eg France or Italy This i...

oltre 2 anni fa | 0

Risposto
Why does matrix inversion cause extremely large values to appear in the inverted matrix?
Consider ax = b where all variables are scaler, what will happen if a is very samll? Then x wil be large In linear system Ax =...

oltre 2 anni fa | 0

| accettato

Risposto
Create a time vector
t0 = datenum([1979 1 1 0 0 0]) n = 14184; % or 14154 t = t0 + (0:n-1); % Show part of the vector datestr(t(end-5:end)...

oltre 2 anni fa | 0

| accettato

Risposto
How can I find all the rows that have a specific value in a specific column of an array?
ex=[0 50 51 52 50 1;0 53 50 52 54 1;0 51 51 54 50 1;0 53 51 52 53 1;0 50 54 52 51 1] I want to find the rows that have 50 in co...

oltre 2 anni fa | 0

Risposto
Set MarkerFaceColor to plot with multiple items.
n = 10; x1 =(1:n)'; y1 = rand(10, 1); x2 = (1:n); y2 = rand(10,1); % Use separate plot when you need to specify additional ...

oltre 2 anni fa | 0

| accettato

Risposto
extract a slice from a 2D matrix with specific values
M = [1 2; 1 4; 7 1 9 1 0 3 0 4 9 0 8 0]; y = M(M(:,2)==1, :)

oltre 2 anni fa | 0

| accettato

Risposto
How to display index/name for each curve when using hold on for plotting?
while(i<pedons(1,end)) switch true case (pedons(i,5)==1) figure(1) plot(nPedons(1:100,i)...

oltre 2 anni fa | 0

Risposto
Add up millisecond steps to a certain datetime
Use "Format" for output (not "InputFormat" which is for input). DateVector = [2021 12 15 01 30 05] A = DateVector; A(6) ...

oltre 2 anni fa | 0

| accettato

Risposto
why bandwidth returns an "inf"?
fb = bandwidth(sys) returns the bandwidth of the SISO dynamic system model sys. The bandwidth is the first frequency where the g...

oltre 2 anni fa | 1

Risposto
Spectrogram: HOW TO CONTROL ZERO-PADDING for individual fft's of an ULTRA LONG sequence
"doc spectrogram" for details. [x, fs] = audioread('RockGuitar-16-44p1-stereo-72secs.wav'); whos % zeros will be padded autom...

oltre 2 anni fa | 0

| accettato

Risposto
My bisection method is freezing when I put smaller error margin.
Your function z does not return a scaler output for a scalar input x since e_D and Re are vectors. for bisection method to work,...

oltre 2 anni fa | 1

Risposto
how can I get username of network user lic?
You can try: $ printenv or $ echo $USERNAME

oltre 2 anni fa | 0

| accettato

Risposto
How can I find equal elements in a vector and place them at the end of the vector?
vector = [10 22 22 22 30 45 45 20]'; [GC,GR] = groupcounts(vector); [GC, idx] = sort(GC); GR=GR(idx); newvec = []; for i=1:...

oltre 2 anni fa | 0

| accettato

Risposto
Using skyplot and hold on
gnss = gnssSensor; pos = [0 0 0]; vel = [0 0 0]; [~, ~, status] = gnss(pos, vel); satAz = status.SatelliteAzimuth; s...

oltre 2 anni fa | 0

| accettato

Risposto
this code is related o signal processing .
clc;clear all;close all; p=2; M=p+1; N=31; n=0:N+M-2; Nfft=1024; wn=randn(1,N+M-1); xn=exp(1i*2*pi*0.2*n)+5*exp(1i*2*pi*0.3...

oltre 2 anni fa | 0

| accettato

Risposto
three dimensional graph for given data
What do you expect? x=0:0.1:1; t=0:0.001:0.01; c=[ 1.0, 1.00200400935774, 1.00401607505823, 1.00603625398793, 1.008064603...

oltre 2 anni fa | 0

Risposto
Changing photo intensity without changes to color map
try "brighten": subplot(121); I = imread("pout.tif"); imshow(I); subplot(122) J = imadjust(I, [0.3 0.7]); imshow(J)

oltre 2 anni fa | 0

Risposto
writing long equation with correct answer
Note that in matlab "( )" are very different from "[ ]": n=10; fn= 1/sqrt(5) * ( ( (1+sqrt(5)) / 2 )^n - (1-sqrt(5)/2).^n )

oltre 2 anni fa | 0

| accettato

Risposto
How to shade several areas in a plot?
x = 210:.5:218; y =randn(size(x)); plot(x, y); hold on yl = ylim; % Use the patch for the box patch([212 213 213 212], [yl(...

oltre 2 anni fa | 1

Risposto
Hi, im new, how to represent this signal
% For matlab symbolic maths, use heaviside for step function u(t) % l(t)=-3u(t+1)+u(t-1)+u(t-2)+u(t-3) syms t l l(t) = -3*hea...

oltre 2 anni fa | 0

Risposto
Horizontal line up to graph line
y = [0.5 1 2 3.5 6 8 10.2 14 18 21 35 41 58 60.5 66 70 90 100]; y1 = [0 0.5 1 2 3.5 6 8 10.2 14 18 21 35 37.32]; % Trapezoida...

oltre 2 anni fa | 1

Risposto
How to do manual operation of cross multiplication or substitution?
Is this what you want? syms A B x z y = A*x^2 + B*x; dy = diff(y) d2y = diff(dy) z = d2y/x^2

oltre 2 anni fa | 0

Carica altro