matlab-figure

what is the solution of the following optimization problem with linear and non linear constraints?

眉间皱痕 提交于 2020-05-17 02:57:32
问题 min x subject to: zeta_1>=b zeta_2>=h t*log(1+m_b*zeta_1)>=t_bh (1-t)*log(1+t*m_h*zeta_2)>=t_hb 0<=t<=1 ||y||=1, where zeta_1=(|transpose(a)*y|^2)*x, zeta_2= (|transpose(c)*y|^2)*x. m_b and m_h are parameters. a,c and y are taken from complex numbers and are having dimension N*1. b,h,t_bh and t_hb are constants. I have used the following simulation. tic clc clear all close all %% initialization N=5; alpha=0.5; eta=0.6; sigma_B=10^-8; sigma_H=10^-8; b=0.00001; h=0.00001; h_AB=[]; h_AH=[]; h_BH

How to add extra information to figure's legend?

旧城冷巷雨未停 提交于 2020-04-07 16:47:09
问题 I want to add extra Information to a figure in MATLAB, like this: Is it possible? (Of course I want it to be more beautiful) 回答1: I put together something reasonably generic, see below. I will generalize this a bit more and post it to the File Exchange, I think it's a fairly nice tool to have around :) I intend to automatically adjust the table size to fit its contents make it suited for arbitrary legend placement couple the table and legend together when moving them with the mouse make the

How to prevent the legend from updating in R2017a and newer?

陌路散爱 提交于 2020-04-06 03:48:33
问题 Since MATLAB R2017a, figure legends update automatically when adding a plot to axes. Previously, one could do this: data = randn(100,4); plot(data) legend('line1','line2','line3','line4') hold on plot([1,100],[0,0],'k-') to plot four data lines with a legend, and then add a black line for y=0. However, since R2017a, this leads to the black line being added to the legend, with the name "data1". How do I prevent this line from being added to the legend, so that the code behaves like it did in

How to prevent the legend from updating in R2017a and newer?

不羁的心 提交于 2020-04-06 03:47:48
问题 Since MATLAB R2017a, figure legends update automatically when adding a plot to axes. Previously, one could do this: data = randn(100,4); plot(data) legend('line1','line2','line3','line4') hold on plot([1,100],[0,0],'k-') to plot four data lines with a legend, and then add a black line for y=0. However, since R2017a, this leads to the black line being added to the legend, with the name "data1". How do I prevent this line from being added to the legend, so that the code behaves like it did in

Axes recovery after plotting in MATLAB

谁说我不能喝 提交于 2020-03-23 06:22:07
问题 After plotting the output of multiple methods from text files, the right and upper sides of the axes are not shown. I need to have them and bold them alike the current axes. The data plotted comes from files in which data for each method have been stored. Each data file is a 256x2 file that includes values between [0,1]. The first column is the precision and the second column is the recall. figure hold on for m = 1:length(methods) prFileName = strcat(readpath,dataset, '_', methods{m}, '

Behaviour of axis properties with 'yyaxis'

怎甘沉沦 提交于 2020-02-24 11:06:03
问题 Create a figure with two y-axes, using yyaxis: figure yyaxis left hl = plot([0 10],[0 10],'-'); yyaxis right hr = plot([0 10],[10 0],'--'); The following curious behaviour has been found. This has been tested in R2017b and in R2019a on Windows 10. The objects hl and hr seem to belong to the same axis (that is, yyaxis does not create a new axis): >> get(hr, 'parent')==get(hl, 'parent') ans = logical 1 However, the 'children' property of the axis only reflects one object : >> get(get(get(hl,

Behaviour of axis properties with 'yyaxis'

丶灬走出姿态 提交于 2020-02-24 11:05:32
问题 Create a figure with two y-axes, using yyaxis: figure yyaxis left hl = plot([0 10],[0 10],'-'); yyaxis right hr = plot([0 10],[10 0],'--'); The following curious behaviour has been found. This has been tested in R2017b and in R2019a on Windows 10. The objects hl and hr seem to belong to the same axis (that is, yyaxis does not create a new axis): >> get(hr, 'parent')==get(hl, 'parent') ans = logical 1 However, the 'children' property of the axis only reflects one object : >> get(get(get(hl,