绘制联合概率分布时,“向量X必须严格增加或严格减少且没有重复值”错误

时间:2019-12-13 03:29:21

标签: matlab error-handling distribution contour

我正在尝试绘制xi和yi的联合分布,它们在Matlab中是独立的数字。 (类似于图片)。 xi和yi的大小均为6980 * 1,这就是为什么我在hist3()中放入6980作为垃圾箱的原因。我收到此错误,但不知道如何解决。你有什么建议吗?

private ConcurrentQueue < byte[] > sendBuffers;
private ManualResetEvent waitEvent = new ManualResetEvent(false);
public void Send(byte[] data) {
  sendBuffers.Enqueue(data);
  waitEvent.Set();
}

public void SendFile(string fileName) {
  using(FileStream fs = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.Read, FileShare.Read)) {
    int count = 0;
    byte[] buffer = new byte[Const.NetDataSize];
    while ((count = fs.Read(buffer, 0, Const.NetDataSize)) > 0) {
      byte[] bytesToSend = new byte[count];
      Buffer.BlockCopy(buffer, 0, bytesToSend, 0, count);
      sendBuffers.Enqueue(bytesToSend);
    }
  }
  waitEvent.Set();
}
public async void Start() {
  await Task.Run(ProcessSend);
}

private async void ProcessSend() {
  if (sendBuffers.Count <= 0) {
    Console.WriteLine("Total Send " + count + " bytes");
    waitEvent.Reset();
  }

  waitEvent.WaitOne();
  byte[] buffer;
  sendBuffers.TryDequeue(out buffer);
  try {
    count += buffer.Length;
    await stream.CancelableWriteAsync(buffer, 0, buffer.Length, source.Token);
    ProcessSend();
  } catch (Exception ex) {
    Console.WriteLine("send exception: " + ex.Message);
  }
}

enter image description here

Error using contour (line 53)
Vector X must be strictly increasing or strictly decreasing with no repeated values.

Error in new (line 24)
contour(xi,yi,pdfData,'ShowText','on','LineWidth', 1.5);

0 个答案:

没有答案